If you feel an unauthorized person is remotely 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 leave your iPhone unlocked and unattended in public places like offices, schools, malls etc.
Keep the iPhone updated to the latest iOS always and never Jailbreak. That's it.
iOS / iPadOS devices cannot be hacked or infected with Virus / Malware / Spyware if it is updated to the latest iOS/iPadOS unless you have intentionally downloaded spurious software or unauthorized apps directly from the internet and installed them on your device or/and have Jailbroken.
It (Hacking) also depends on how careful you are in sharing sensitive and valuable information pertaining to your iPhone such as Passcode, Password, etc with your friends and family members.
Be judicious when sharing the device's sensitive and valuable information with friends and family members.