Hi there,
Please try this in order to regain access to your MacBook
Start up from macOS Recovery
Determine whether you're using a Mac with Apple silicon, then follow the appropriate steps to start up from macOS Recovery:
- Apple silicon: Turn on your Mac and continue to press and hold the power button until you see the startup options window. Select the gear icon labeled Options, then click Continue.
- Intel processor: Turn on your Mac and immediately press and hold Command (⌘)-R until you see an Apple logo or other image.
If you're asked to select an admin user
If you're asked to select an admin user you know the password for, click “Forgot all passwords?” and proceed as described below.
If you're asked for your Apple ID information
Enter your Apple ID information. You might also be asked to enter the verification code sent to your other devices.
If you see an Activation Lock window, click Exit to Recovery Utilities. Then continue as described in the next section, “Use the Reset Password assistant.”
If you're asked to select a user that you want to reset the password for:
- Select the user, then enter your new password information and click Next.
- When authentication has succeeded, click Exit.
- Choose Apple menu > Restart. Password reset is now complete, so you don't need to take additional steps.
If you're asked for your recovery key
- Enter your FileVault recovery key. You received it when you turned on FileVault and chose to create a recovery key instead of allowing your iCloud account (Apple ID) to unlock your disk.
- When prompted to reset your password, click Reset Password.
- Select a user to reset the password for.
- After successfully authenticating, click Exit.
- Choose Apple menu > Restart. Password reset is now complete, so you don't need to take additional steps.
Use the Reset Password assistant
You should now see the utilities window, which shows options such as restoring from Time Machine, reinstalling macOS, and using Disk Utility.
- From the Utilities menu in the menu bar, choose Terminal.
- In the Terminal window, type resetpassword, then press Return to open the Reset Password assistant.
- If you're asked to select an admin user you know the password for, click “Forgot all passwords?”.
- At the Reset Password window, click Deactivate Mac, then click Deactivate to confirm.
- If you see an Activation Lock window, enter your Apple ID email and password, then click Next.
- At the Reset Password window, enter your new password information, then click Next.
- If this window shows multiple user accounts, click the Set Password button next to each account name, then enter the new password information for each account.
- When the password reset is completed, click Exit.
- Choose Apple menu > Restart, then log in with your new password.
https://support.apple.com/en-us/HT212190