The best and most robust way to secure your Mac is to Lock the computer whenever it goes to sleep.
You can update this setting by going to System Preferences > Security & Privacy > General and selecting Require password "immediately" after sleep or screen saver begins.
Then, check your Energy Saver preferences that put your computer to sleep after periods of inactivity. Depending on the nature of your work, you may want a very short period while others may want longer periods. To update these settings go to System Preferences > Energy Saver and change the time period for Display sleep to something small like 1 minute. Since entering Computer sleep will make it take longer for Knock to connect, we recommend setting Computer sleep to a high value, especially when running on Power Adapter:
Finally, you can quickly lock your Mac through any of the following methods:
1) Close the lid if it's a laptop or press the power button
2) Click on the Apple in the menu bar and select "Sleep"
3) Use the built-in "Lock" button on the Knock icon
4) Assign a Hot Corner to "Put Display to Sleep" or "Start Screen Saver"
System Preferences > Desktop & Screen Saver > Hot Corners...>