At the login screen, look for a small question mark next to the password field and click it. If there is none, type a wrong password up to three times and look again. The Mac then shows your password hint, if you set one, and one or more of these. If nothing ever appears, keep reading, the next section explains why.
- Reset it using your Apple Account. Offered when the account was set up to allow it. Enter the Apple Account email and password, approve the sign-in on your iPhone or with the code it sends, and choose a new login password. Your files stay where they are. Not available on most company Macs, where IT turns it off on purpose.
- Reset it using your recovery key. Offered when FileVault, the Mac's disk encryption, is on. The key is 24 letters and numbers in groups of four, shown once when FileVault was turned on; it never contains the letters I or S or the digits 1 or 0. You may have saved it in a password manager or printed it, and on a Mac running macOS Tahoe 26 or later it may also be in the Passwords app on your iPhone, iPad or another Mac signed in to the same Apple Account: search there for "recovery key". On a company Mac the key was sent to the management system, so IT can read it out to you. Type it, set a new password, and everything is kept.
- Restart and show password reset options. The Mac restarts into a recovery mode. If it asks you to select a user you know the password for, pick a second admin if there is one, or click "Forgot all passwords?". It then walks you through the Apple Account or recovery key route, may ask to temporarily deactivate the Mac (allow it) and to create a new keychain (allow that too), and finally lets you set a new password.
Two small things trip people up. Caps Lock on a Mac shows an arrow symbol inside the password field, so look for it. And if the keyboard layout changed, for example from US to German, letters like Y and Z swap, so try your password with the other layout once before giving up.