Summarize this article in one sentence.
If you enabled this security feature when you first set up your account, you'll be able to use your Apple ID to reset your password. This only works if this feature is enabled to begin with. If you have access to your Mac, you can turn this setting on by clicking the Apple menu and selecting "System Preferences." Click the "Users & Groups" option, then select your account. Click the padlock button to unlock the settings, then click "Allow user to reset password using Apple ID." This will appear after entering your password incorrectly three times. If this option does not appear, this function has not been enabled for your account and you'll need to use another method in this article. To reset your admin password, you'll need to enter your Apple ID password. This is the Apple ID that is associated with your Mac user account. After entering your Apple ID password, you'll be prompted to create a new admin password. You'll need to enter it twice to create it. You'll have to reboot your computer after creating a new admin password. Once your computer reboots, enter the new password you created to log in. When you log in after using your new password, you'll likely be prompted that your Keychain cannot be accessed. This is because the Keychain is only secured with your original admin password, and cannot be accessed with the new password for security reasons. You'll need to create a new Keychain for your passwords.
Try entering a wrong password three times. Click the link that appears to reset your password. Enter your Apple ID password. Create a new admin password. Use your new password after rebooting. Create a new Keychain.