If you have 7-Zip installed on your Mac, simply launch Archiver > drag and drop all the files you wish to archive onto the app > select Archive in the bottom bar > pick 7ZIP as a format > set a compression level or keep the archive lossless > check Encrypt to set password protection > click Archive when ready.
Alternatively, you can free download and install iBoysoft MagicMenu to compress files on Mac.
It's a right-click menu utility that allows you to perform various tasks including file compressing on Mac with a simple right-click. With it installed, you can select one or multiple files or folders, right-click on them and choose Compress to zip your files.
Best wishes~