Welcome to our forums.
You're not doing it correctly. Do it this way:
Use Recovery Mode to reset your password
You'll need to boot your Mac into Recovery Mode in order to access the password reset tool. I've found the easiest way to do that is to turn off your Mac.
With your Mac turned off, press and hold the Command and R keys on your keyboard, then press the power button. Hold in Command+R until you see a progress bar show up below the Apple logo. You can also get into Recovery Mode by restarting your Mac and trying to time the keyboard combo of Command+R, but in my experience, starting with your Mac turned off is the most reliable method.
With your Mac now in Recovery Mode, click on Utilities in the menu bar followed by Terminal. A new window will show up, waiting for you to enter a command. Type "resetpassword" as one word, without the quotes, and press Return.
Close the Terminal window, where you will then find the Reset Password tool. A list of all user accounts on your Mac will be on display. To reset the password for your account, you'll need to set a new password for all users. Make sure you write down the new password for anyone who shares your Mac.
Let us know.