It’s a problem that we’ve all encountered at some point: you turn on an older device only to be greeted by a login screen requesting a password you’ve forgotten. You can try guessing the password, which might work if you have the bad habit of only using a few options for all of your devices and accounts. However, if you create strong, unique passwords, the chances of suddenly remembering the random numbers and letters are extremely low.
Fortunately, Apple anticipated this issue and simplified the process of forgotten my mac password directly from the laptop. Don’t worry, you won’t have to factory reset the Mac; however, if the thought of doing so makes you nervous, now might be a good time to back up your MacBook before something worse happens. The entire password-resetting process can be completed in about 10 minutes or so, but it all depends on having at least one key piece of information to verify your identity, such as the Apple ID registered to the device. If you’ve also forgotten those details, you’re in for more trouble, as you’ll almost certainly need to contact Apple for assistance at that point.
Preparing to reset your MacBook password

Resetting a Mac password is as simple for the vast majority of users as entering an incorrect password three times to trigger the macOS password assistance prompt. According to Apple’s support documentation, the prompt will ask if you want to reset the password using your Apple ID or restart the laptop to see the reset options available to you.
The exact option you receive will be determined by how you configured your MacBook and the version of macOS it is running. Most users will see the option to reset the password using their Apple ID, which is as simple as logging into the Apple account — though, as Apple points out, the MacBook may restart before you’re prompted to enter that information. Depending on your settings, you may also receive a verification code on one of your other devices, which you must enter on the MacBook to reset the password.
However, if you previously enabled FileVault and created a recovery key for it, Apple says you may be prompted to enter that recovery key after restarting the laptop in order to unlock it. After that, you’ll be guided through the process of resetting your password.
How to reset a forgotten MacBook password

You’ll have access to the password reset feature once you’ve completed the steps outlined above, whether that involved signing in with an Apple ID or entering a recovery key. Though macOS will not display your old password, you will be able to create a new one and use it to sign in in the future. That procedure is extremely simple.
Choose the user you’d like to reset the password for and click Next.
Enter your new MacBook password and click Next.
Select the Restart option.
Read Also; GOOGLE MAPS INCOGNITO MODE IS FINALLY ROLLING OUT NOW ON ANDROID
According to Apple, in some cases, you may be able to reset your password using your Apple ID without having to restart. In that case, on the login screen, you should be able to simply enter your Apple ID and password. However, if you’re attempting to access an older MacBook running macOS Mojave or an earlier version of the operating system, the process is far more difficult, less likely to work, and you may need to contact Apple support for assistance, as explained in an old archived Apple support document.