Update iOS to the latest version
Restart the iPhone
Delete suspicious apps
Clear Safari history and website data
Remove unknown calendar subscriptions
Check and remove unknown configuration profiles
Turn off pop-up notifications from suspicious websites
Reset all settings if needed
Restore the iPhone from a trusted backup if problems continue
Erase all content and settings and set up the iPhone again if necessary
Change Apple ID, email, and important account passwords
Enable two-factor authentication
Avoid sideloading apps and unknown links
Install apps only from the App Store
