You can try to enter the might-be password in the login box. If the password is wrong, you can't log in to your Mac. After three times of wrong attempts, you will see a message that says 'If you forgot your password, you can reset it using your Apple ID.' If you have associated the password with your Apple ID, you can use it to reset your password and access your Mac again.