I had the same issue. I have windows 10. I tried all the techniques on the internet: I pressed shift key while clicking restart and I went into advanced section but this did nothing because whenever I chose repair or safe mode or command prompt, It asked for my password and I put in the correct one but it still said it was incorrect.
This is what worked for me:
I downloaded passper winsenior on another computer. Burned my usb. Put the usb in my laptop after turning it off. Pressed escape repeatedly until bios came up. I chose my usb as the bootable drive. In the next section I chose the drive that houses windows 10. I then chose the option to create a new admin account. I named it and put in a pin. I rebooted my laptop. I chose my new admin account when logging in but I didn't log in, I just chose the account and I didn't put in the pin. I pressed the shift key and pressed restart and went into the advanced section. I chose safemode in the troubleshoot section. I restarted and logged in using my new admin account.
In the desktop, I right clicked the windows icon at the bottome left and chose run. I then typed msconfig and chose normal startup.
I shut down my laptop and restarted it again. I logged in using my previous administrator account, the one that had the pin issues. The problem was solved and I was able to log in successfully.