When you set up your Mac, you probably didn't realize you created an administrator account. Until you need to find the administrator password Mac helped you set up at the start, you probably coast along without thinking about it. As with any other time you forget a MacBook password, you need to go through a process to recover it if you can't remember what it is.
Find the Administrator Password on a Mac
If you forget the MacBook admin password, the best place to locate the accounts you've set up is in the "Users and Groups" section of "System Preferences." The accounts are listed in the left pane, and one of them is identified as the admin account. If you ever set up a second administrator account, which is highly recommended, it will be listed there too. The easiest way to locate the original admin account password is to click on the admin account to select it and click the lock in the lower corner of the screen to unlock the account. From there, you can reset the password using the credentials of the second administrator account.
If you only have one administrator account, resetting the sole admin password is tricky. If you don't have a second administrator account, set one up as soon as you can. You can do so on that same screen by choosing the plus button located at the bottom of the user account list. Choose "Administrator" from the list of options and select a password.
Use Apple ID
If you forgot your MacBook password and you only have one administrator account, you may be able to use your Apple ID to reset your password, assuming you have a newer operating system. This method is easier than trying to recover a Mac password. When you're at the login screen, keep entering a password until you get the message letting you know you can reset your password using your Apple ID. This message should appear after three attempts at entering a password. If it doesn't, chances are you don't have an operating system with this option.
Use the Reset Password Assistant
If you've enabled FileVault to encrypt your hard drive, you may have one last way to recover a Mac password. When the login screen appears, wait a minute or so until you see a message alerting you that you can press the power button to reboot into Recovery OS. If you don't see that message, FileVault likely isn't turned on. If you do, press and hold the power button until your Mac turns off and back on again. When the computer boots back up, you'll see a prompt to reset your password. If none of these options work, though, and you still can't find administrator password, Mac users can contact Apple for one-on-one support. Go to support.apple.com/contact and reach out by phone or locate a nearby authorized Apple dealer for help.