You can create a folder directly in Finder. Navigate to the desired directory and create a folder. We will create an encrypted disk image from this folder. The files we want to secure will go inside of this folder.
Choose a name and location for the image.
Keep in mind, ".dmg" will be automatically appended to the name you choose.
Then select either either 128 or 256 bit encryption.
By default, this will create a read-only image. If you'll need to write to this folder again in the future, change the Image Format to read/write.
Enter the password, verify, and click save.
This password will be required when you try to mount the disk image to view the contents so you should write down this password.
Use a strong password, and store it securely. Consider using a password manager like 1Password or Dashlane.
To test the image you've created, find the image in Finder and click to open. When prompted, enter the password you set previously. This will mount the image and display the contents of the folder.
When you're finished, make sure to unmount the image. You'll see the image in the left column of finder and you can click the eject icon to unmount.
I always keep an eye on my MacBook's battery percentage—especially since, as a developer, I run a lot of resource-intensive applications.