iOS / iPadOS devices cannot be hacked or infected with Virus / Malware / Spyware by merely clicking on a link in Safari, 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:
- Don't share Apple IDs
- Don't Jail Break
- Don't share sensitive informations pertaining to your device and payment methods
- Beware of Phishing