If you need to reset your iPhone to factory settings to resolve an issue, you can back it up to iCloud first and then restore it to keep your data.
Here is the step-by-step tutorial for resetting your iPhone to factory settings, which means your phone will be exactly the same as it was when opening the box. Before doing this, it’s always best to ...