Make a password-protected folder

Disk Utility can make an encrypted disk image: a file that opens as a drive once you type the password. File → New Image → Blank Image, with Encryption set to 256-bit AES.

Without Terminal

  1. Open Disk Utility.
  2. File → New Image → Blank Image.
  3. Set a size, Format APFS, Encryption 256-bit AES, and choose a password.
  4. Double-click the .dmg to open it; drag files in; eject to lock it.

In one command

The same from Terminal — it asks for the password:

hdiutil create -encryption AES-256 -size 1g -fs APFS -volname Private ~/Private.dmg

There is no way back in without the password. Keep it in a password manager.

Or just ask Titan
Make me an encrypted folder for my tax documents. Do it with Titan

Titan is an AI that lives on your computer: tell it what you need and it does it while you watch — you press Return, nothing runs by itself. What is Titan?

Titan isn’t on this computer yet. Get Titan, then press the button again — the task will be waiting, typed in.

Related

Zip a folder with a passwordCopy a folder to a backup drive