Restart the iPhone
Update iOS to the latest version
Delete suspicious apps
Remove unknown profiles and device management settings
Clear Safari history and website data
Remove suspicious calendar subscriptions
Check and delete unknown mail accounts
Change your Apple ID password
Enable two-factor authentication
Review account security settings
Restore the iPhone from a trusted backup
Erase all content and settings if needed
Avoid jailbreaking
Do not install apps from untrusted sources
Use a trusted security app only if needed
