Forgot my computer password or I'm locked out
Being locked out is stressful, but there are official ways back in, so let's start with the simple checks.
Be careful: Resetting a computer to get in can erase everything on it. Only reset a computer that belongs to you, and if you see a BitLocker screen, find your recovery key by signing in to your own Microsoft account on another device.
What to do
Step 1: Check that Caps Lock is off. The password box shows a small arrow when it's on.
Step 2: Click the question mark in the password box to see your password hint, if you set one.
Step 3: After three wrong tries, your Mac may offer to reset the password using your Apple Account. Click the option shown and follow the steps.
Step 4: If your Mac offers Restart and show password reset options, click it and follow the steps on screen. You may be asked for your Apple Account details or your FileVault recovery key.
Step 5: If you have another administrator account on this Mac, sign in to that one and change your password in System Settings > Users & Groups.
Still stuck? Contact Microsoft or Apple support through their official website or app, or take the computer and proof you own it to a trusted repair shop.