You can encrypt your entire Mac drive with FileVault, but there are simpler options when it comes to password protecting individual files and folders.

Source: How to Password Protect Files and Folders on Mac