For your perusal:
Change or reset the password of a macOS user account - http://support.apple.com/HT202860 - "You can change the password that you use to log in to your Mac, or reset the password if you don't remember it."
If you have another admin account set up on your MacBook, you can reset your password from there. If not, you may be able to reset it using your Apple ID or FileVault if enabled.
If you forgot your user or account name on Mac
https://support.apple.com/guide/mac-help/if-you-forgot-your-user-or-account-name-mh35548/mac
If you forget [sic] your login password on Mac, click on this link and select the macOS version you use -->
https://support.apple.com/guide/mac-help/if-you-forget-your-login-password-on-mac-mh11627/mac
To learn how to 'Reset your Mac login password', click here and select the appropriate system version document --> https://support.apple.com/en-us/guide/mac-help/reset-your-mac-login-password-mh35902/mac