@Allan Jones brings up a good question. If you purchased a used Mac and you did not perform a clean install of macOS, then it may indicate a previous owner may still have control of the Mac. Even with a clean install of macOS a previous owner may still retain control, although you will usually see some sort of message or notification that the Mac is being managed (may not appear for days or weeks later).
If you cannot reset the password using the link I provided earlier, then you can first try the simpler option of just using a Time Machine backup to restore your account as @John Galt has suggested.
Otherwise you will most likely need to perform a clean install of macOS by first erasing the drive (or Volume Group) before reinstalling macOS & restoring from a backup. You can also perform a clean install if you have access to another Mac running macOS 10.15+, by "Restoring" the firmware which resets the security enclave and pushes a clean copy of macOS onto the internal drive.
Revive or restore an Intel-based Mac using Apple Configurator - Apple Support
Revive or restore a Mac with Apple silicon using Apple Configurator - Apple Support
How to reinstall macOS - Apple Support
I hope you have good backups since there is no way to access the data on the internal drive without being able to authenticate to the Mac even when booting into Recovery Mode or Target Disk Mode. If this Mac was purchased used, then none of these steps may work, or may only work for a short time.