Back up any photos, contacts, messages, files, and app data you want to keep
Make sure the phone has enough battery or connect it to a charger
Open Settings
Tap System
Tap Reset options
Tap Erase all data or Factory data reset
Review the warning message
Tap Erase all data or Reset phone
Enter your PIN, password, or pattern if prompted
Confirm the reset
Wait for the phone to restart and complete the reset process
Set up the device again after it restarts
