Before the hard reset, please back up any critical data as the factory reset deletes all photos and resets all settings.
1. Go to Settings>System>Reset options, and choose an option you want for factory data reset:
Reset Wi-Fi, Bluetooth & Mobile
This option will reset your smartphone's Wi-Fi, Bluetooth, and mobile network settings.
Reset app preferences:
This option will reset all phone app preferences without deleting any app data.
Erase All Data
Clear all data, including photos and music.