Back up your iPhone
Open Settings
Tap General
Tap Transfer or Reset iPhone
Tap Erase All Content and Settings
Tap Continue
Enter your passcode
Enter your Apple ID password if prompted
Tap Erase iPhone
Wait for the reset to complete
Set up the iPhone as new or restore from a backup
