There are 3 ways to reset your Android Device or phone when it was locked. Just follow the steps as given below:-
Step 1: If you want to reset Android phone then at first you need to go to the Settings option in your Android handset.
Step 2: After tapping on the Settings option, the screen will be directed to another window where you need to search the Backup & Reset option. If you are not able to search that, then you can go to More Settings option.
Remember different Android handset companies have different options for resetting. If you are not able to find the options given here then you need to explore more to find the Backup and Reset feature.
Step 3: After tapping on More Settings, you will find the option of Backup and Reset. You need to select that which will take you to the next step.
Step 4: Before resetting your phone you can select the Backup data option to keep your files safe. Otherwise, you can select any of the three options in the Reset section as shown below in the picture.
Step 5; The option Reset network settings are only to reset your WI-Fi and data network. If your Wi-Fi or data network is not working properly then you can reset it with this option given below to fix the problem.
Step 6: The Reset all Settings is another option for Android phone reset which will convert all the manual settings to a default one without deleting any of the data stored inside the phone, like your pictures, videos etc.
Step 7: Last option is to opt for factory reset android phone. Erase all data will clear every settings and file from your phone.
Step 8: Now the phone will ask to enter your screen lock password to complete the entire process, after which you are done with your android resetting.