If you're planning to sell or repair your iPhone, you should back it up before you do anything else to ensure that your data and accounts are completely erased. What about your records? What if your phone has just stopped operating and you want to restore it back to normal?
All the information you need to know about resetting your phone or tablet can be found here.
Go to Settings > General > Reset > Erase all content and settings to do a full factory reset on your iPhone or iPad. Before the process is complete, you will be asked to input your passcode and Apple ID.
How to do a soft reset on your iOS device.
A soft reset is all you need to do if your phone has stopped responding and you need to restart it but the buttons don't function.
When using an iPhone without a home button (such as the iPhone X and later models), hold down the volume up and down buttons until the Apple logo shows.
In order to shut down an iPhone that has a home button, hold down both the power and home buttons simultaneously until you see the Apple logo.
Make a backup before performing a factory reset.
It's possible that you'll need to factory reset your gadget at some point, but not because you want to give it away.
You may back up your iPhone or iPad using iCloud, which comes with 5GB of free storage. If you need additional space, you can purchase it.
Using iCloud as a backup solution is as easy as going to Settings > [Your name] > iCloud > iCloud Backup. You'll want to turn it back on if it's turned off. Tap Back Up Now to make a backup regardless of whether it's already on or not. If it isn't, connect your iPhone to Wi-Fi and charge it again.
The other option is to connect your iPad or iPhone to a computer and create an exact copy of everything on the device. Plug it in, unlock it, and wait for it to appear in iTunes on Windows (or macOS 10.14 or older with iTunes). Then click on it. The Backups section should appear on the Summary screen. The Back Up Now button is all that is required.
Check the Encrypt iPhone backup box if you wish to save all your passwords.
Methods for restoring a factory settings on an iPhone or iPad
Finder has replaced iTunes if you're running macOS 10.15 Catalina or later. Open the Finder and search for "iPhone" in the left-hand menu; this will bring up your iPhone's backup. The Backups section can be found under the General tab. To begin the procedure, select Backup all of the data on your iPhone to your Mac.
You can then continue the reset procedure after that has been completed. It's also a good idea to remove the SIM card from the iPhone or iPad before handing it off, as this may contain personal information and you may want to continue using it in a new device.
Resetting your iPhone or iPad
In general, here's how to factory reset an iPhone or iPad, however your specific version of iOS or iPadOS may require slightly different methods or language.