Resetting your iPhone
If you still have the device
Before sending in your iPhone you will need to reset it.
(this deletes your personal information & removed the link to your iCloud account)
To do this, go to Settings, tab General > Transfer or Reset [device] > Erase All Content and Settings.
If you turned on Find My [device], you may need to enter your Apple ID and password.
If your device uses eSIM, choose the option to erase your device and the eSIM profile when asked.
If asked for your device passcode or Restrictions passcode, enter it. Then tap Erase [device].
If you no longer have the device
Sign in to iCloud.com/find or the Find My app on another device, select the drive, and click Erase. After the device has been erased, click Remove from Account.