Create an Encrypted ZIP archive on macOS command line (cli)

zip -er FILENAME.zip FILESorFOLDERStoCOMPRESS

ex: zip -er ThisFolder.zip This\ Folder/

You will be prompted for a password and will have to verify it.