One of the first things you may want to do when setting up a new Mac is add a password. By requiring a password each time you log in, bad actors will have a harder time trying to extract your data, a**uming they have physical access to it. This also means you should lock your Mac whenever you leave it unattended to block those in the same space from viewing your files. Fortunately, setting a password on macOS Sonoma and earlier versions is quite easy, and there are several ways to lock your Mac. Below, you will find the detailed steps you have to follow.