The best tips to prevent your phone from being tapped are as follows -
1. Never leave your phone unattended
2. Regularly update your phone
3. Use two-factor authentication
4. Do not use public Wi-Fi
5. Do not install unwanted applications
Learn More - https://allsavvy.net/code-to-check-if-phone-is-hacked