Back up before you change anything
An official reset or a failed SIM swap should not be the way you learn you had no backup.
- 01
iPhone: Settings → [your name] → iCloud → iCloud Backup → Back Up Now. Or Finder / the Apple Devices app on a computer.
- 02
Android: Settings → System → Backup, and copy photos off with the official USB file transfer or the brand's backup app.
- 03
Sign out of accounts you do not want left on a phone you might sell only after the backup finishes and you have checked it.
- 04
Write down the Apple ID or Google account. A phone you cannot sign into is a different problem from a carrier lock, and only the account holder can clear it.
Official carrier and settings procedures only. This is not a bypass, IMEI, or stolen-phone service.