From Settings, tap General.
Scroll to and tap Transfer or Reset iPhone.
Tap Erase All Content and Settings.
Tap Continue.
If a device passcode has been set, you will need to enter it.
Choose your preference.
If you want to keep your eSIM plan on your iPhone, select Keep eSIM and Erase Data. If you are erasing your iPhone to give to someone else, choose Delete eSIM and Erase Data.
You've completed the steps!
