If you feel an unauthorized person/app is remotely using, controlling or monitoring your device, then that is possible only if you have done one or more of the following Don'ts...
- Don't hand over an iPhone to kids or to a stranger without Enabling Guided Access
- Don't share Apple IDs
- Don't Jailbreak
- Don't share sensitive information pertaining to your device
- Don't give in to Phishing
- Don't plug in your device in Airports and Public places through third-party cables and trust the device. Beware of Juice Jacking. (Especially in India)
- Don't leave your iPhone unlocked and unattended in public places like offices, schools, malls, etc.
If one of the above is true then quickly change the Apple ID Password and Return iPhone settings to their defaults.

Keep the iPhone updated to the latest iOS always and never Jailbreak. That's it.
iOS / iPadOS devices cannot be infected with Viruses / Malware / Spyware unless you have intentionally downloaded spurious software or unauthorized apps directly from the internet and installed them on your device or/and have Jailbroken.