Please refer to here for how to set the time until the screen saver starts. » Mac - How to set screensaver
Require password to wake up sleep/screen saver
Check → Require password Uncheck → Do not require password
Setting time before password is required
immediately after 5 seconds after 1 minute after 5 minutes after 15 minutes after 1 hour after 4 hours