For Android: Never install an app from an unfamiliar source. Playstore apps are carefully scrutinized, despite the fact that malicious programs slip through now and then. Installing from an unknown source poses a much greater risk of installing a malicious app.
Before installing: Check what kind of information the app asks for. If the app is too greedy, look for an alternative. Oftentimes what you really need is functionality, not a specific app.
Delete unnecessary apps. This frees up space and ensures that potential vulnerabilities no longer pose a risk.