Require a password when resuming from a stand-by mode
A screensaver password and a sleep/stand-by password are different settings.
Screensaver
It is likely that your screensaver starts up before your computer goes to sleep, so that may be a better choice on a desktop.
In searchbox type “Change screen saver”, then press Enter.
In the Screen Saver Settings window, check the box On resume, display logon screen.
OK
Sleep/stand-by
A laptop is put to sleep when by closing the lid. A screensaver would not be active, and a screensaver password not needed.
For a sleep/stand-by password:
Control Panel -> Power Options
On the left choose Require a password on wakeup
You may have to click the link that says “Change settings that are currently unavailable”
Select Require a password
You will be able to wake the computer with your local password.