Keyboard shortcut to lock the screen on macOS 10.14 Mojave?
You can use the built-in keyboard shortcut Control + Command + Q to lock the screen.

The command is also accessible via  → Lock Screen in the Menu bar.