With the newest Apple silicon hardware (M1, etc) there different steps
in some instances to get into resetting the password, & other details.
This info is in (and within) addition to linked reference article above.
• If you can't reset your Mac login password - Apple Support
https://support.apple.com/en-us/HT212190
There may be a 'verification code' sent to your other Apple devices.
[If you set up and enabled FileVault, that could be another issue.]
.Some of these details may (or not) relate to various M1 instructions.
Online there are a few fairly OK youtube instructions on this topic.