How do Factory reset your iPhone from settings? This article will explain how to reset any iPhone model running iOS 12 and later to its default settings. It also explains how to deactivate iCloud or Locate My iPhone, which is essential in certain circumstances (explained in the next section).
Source Link : https://viraldaddy.me/2022/11/24/how-to-factory-reset-iphone/