iOS / iPadOS devices cannot be hacked or infected with Virus / Malware / Spyware if it is updated to latest iOS/iPadOS, unless you have intentionally downloaded spurious softwares or unauthorised apps directly from internet and installed on your device or/and have Jail Broken.
It (Hacking) also depends on how careful are you in sharing sensitive and valuable informations of your iPhone such as Passcode, Password etc with your friends and family members.
Be careful when sharing the device's sensitive and valuable informations with friends and family members.
Thumb Rules:
- Enable Guided Access before handing over an iPhone to kids
- Don't share Apple IDs
- Don't Jail Break
- Don't share sensitive informations pertaining to your device and payment methods
- Beware of Phishing