Go to OSX Daily to read How to Reset MacOS Password in MacOS Big Sur, Catalina, Mojave
Did you forget or lose the password for your Mac’s user account? Thankfully, macOS Big Sur, Catalina, and Mojave make it easy to reset this password, and you can do it in a matter of seconds regardless of what Mac you own, with the help of your Apple ID.
Nowadays, almost everyone who owns Apple devices already has an Apple ID that’s used for making purchases on the App Store, subscribing to services like iCloud, Apple Music, and more. Therefore, there’s a pretty good chance that you have already signed in to your Apple account on the Mac you’re using.
Read more: How to Reset MacOS Password in MacOS Big Sur, Catalina, Mojave