First, please check to see the Caps Lock keyboard function has not inadvertently been left active. Even if the Caps Lock green LED is not illuminated and / or the ⇧ icon does not appear in the password field, press the Caps Lock key (once) to toggle its state and try again.
Then: Even though you are completely certain the password you are using is 100% correct, please read If you forgot your Mac login password - Apple Support. Follow all of those steps from start to finish.
There are many steps that begin with "if" you see this or "if" you see that; the reason being is that there have been many Macs and many macOS versions and even more ways of configuring their login options, all of which have various ways of coping with allegedly incorrect or legitimately forgotten login credentials. Methodically exhaust every single one of those steps. You may eventually find yourself at the last and final step which is to completely erase the Mac and restore its content from a Time Machine backup. You have one, right?