You can wipe and reset the phone if you can't get past the lock screen - but (a) you'll lose everything on the device that's not backed up, and (b) you will have to set up the device using a Google account that was used on the phone previously.
With the phone switched off, hold the volume-up button. The phone will boot up and will leave you at a screen showing the Android robot undergoing open-heart surgery. Press the volume-up and power buttons and you'll be given a menu. Use volume-up and volume-down to move up/down to select the Factory Reset option; the power button will select. You will be asked to confirm. When done, select the reboot option from the menu. You can then set the phone up again. There are picture and video tutorials out there for the procedure.
What works for me :
When phone is on connect with USB cable to PC.
Turn phone off, immediately press volume up button after this.
Wait for the little Android to appear.
Press power + volume down to access the recovery menu. -> this might take a few tries cause you have to be really precise, but this was the same on my Nexus 5X.