Resetting a locked Android device without any risks is easiest via Recovery Mode. Firstly, you need to turn off your device, then press and hold the Power and Volume Up (or Volume Down) buttons until the recovery menu appears. Use volume keys to select Wipe data/factory reset and confirm with the Power button. This step deletes all your data and reinstalls factory settings. Beyond reset, one might have to verify the device through Google Factory Reset Protection, which ensures that the device can be accessed only by its original owner, for security reasons. Read more: https://datarecovee.com/how-to-reset-android-phone-when-locked/