Scroll down and tapGeneral.
Scroll to the bottom and tapReset.
On theResetscreen, tapErase All Content and configs.

If prompted, enter thepasscode set on your phone.
The screen displays a warning that all music, other media, data, and options will be erased.
If you don’t want to restore the phone to its default state, tapCancel.

It takes a few minutes to delete everything from the iPhone.
When the process is done, the iPhone restart and the iPhone has been reset to original parameters.
All that will be left is the iOS and the pre-installed apps.

That’s why it’s crucial to back up your data before you get started on the process.
There are three options to back up data: using iTunes, Finder, or iCloud.
The feature is disabled when you turn off iCloud/Find My iPhone.
Activation Lock has reduced iPhone thefts since it makes a stolen iPhone harder to use.
Tap your name (skip this step on earlier versions of the iOS).
TapiCloud>Find My iPhone>Find My iPhone.
(On iOS 13 and up, skip iCloud and just tapFind My.)
Move theFind My iPhoneslider to off/white.
TapFind Myin the top left corner to go back one screen.
Then tapApple Account(In some versions of iOS, this option is called “Apple ID.")
to go back one more screen.
Scroll to the bottom of the screen and tapSign Out.
If prompted, slide in your Apple Account/iCloud password.
Torestart an iPhoneX and later, press and hold theSide button+Volume Downsimultaneously.
On earlier models, press and hold theSleep/Wakebutton.
When the power off slider appears, releaseSleep/Wake.
After a reset, you must manually reconfigure the Wi-Fi and VPN configs.