one way,force factory reset(The data in the mobile phone will be deleted.):
In the case that the mobile phone is not plugged into the USB data cable, press and hold the volume up button and the power button at the same time, release the power button when the boot screen appears, and release the volume up button after 3 seconds to enter the Recovery mode. After entering, choose to wipe data/factory reset and restart.
Another way,If you have turned on the mobile phone retrieve function,you can use the computer to log in to the official cloud service, the mobile phone retrieve function can unlock the mobile phone.