On the sign-in screen look right below where it asks for your PIN — there should be a small "Sign-in options" link. Click that and look for a password icon. If you can sign in that way using your regular Microsoft email and password, you're back in and can sort the PIN out from inside Settings.
Next time it pops up after a failed PIN attempt, don't just focus on the code — look carefully at the bottom of that screen for a small link that says something like "I forgot my PIN" or "Reset PIN."
Since you're locked out, try this instead — hold the power button down hard for about 10 seconds until the laptop shuts off completely. Turn it back on, and then force shut it off again as soon as you see the Windows logo. Do that three times in a row and Windows should automatically drop you into a recovery screen where the Troubleshoot options will finally appear.
If there's a physical Microsoft Store near you, just walk in — the in-person support team deals with exactly this kind of lockout issue regularly and can often sort it quickly. Second, try messaging @MicrosoftHelps on X
As a last option, you can do Windows Reset: choose the option that keeps all your personal files, photos and documents intact. It essentially just wipes the account and PIN problem away and lets you start fresh with your login.
Microsoft Reference Article: