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
Tap Erase iPhone
Wait for the reset to finish
Set up your iPhone as new or restore from backup
