But factory reset of your iPhone will remove all your iPhone apps, files and valuable data and turn it into what it was when you bought it, hence before starting the iPhone factory reset, always back up your iPhone, so that all your data is safe and can be restored. You easily backup your iPhone on iCloud as follows:
Open your iPhone Settings app and tap on your name
Then choose iCloud and under iCloud Backup, tap on Back up now
You can also back up your iPhone to your PC on iTunes directly with a click on the backup button.
Now, that your iPhone is ready for a factory reset, you can easily reset your iPhone to factory mode on both your iPhone and computer in just a few minutes below:
Factory reset from iPhone itself
Go to your iPhone Settings app.
Select the General tab from the settings list.
Scroll down, locate and select the Reset tab,
Then tap on Reset All content and settings bar.
A warning box will pop up showing Erase iPhone in red colour.
Just tap on Erase iPhone and confirm by typing your Apple ID password.’[o9uko;p;
After 5 minutes, your initial screen set up will appear.