Tony already explained the iCloud Preferences, but how much storage is your Photos Library using in iCloud? Even with optimise Mac Storage enabled you should expect that the optimised versions on your Mac will use at least a fourth of the storage size the full versions are using in iCloud, And Photos will be trying to use the free storage to keep your most recently downloaded photos stored locally in the full resolution, so you can work faster and do not have to download the same photo over and over again. But Photos should remove the full resolution versions automatically, when other applications need more storage. However, I would not keep more photos and videos in iCloud than will fit onto your Mac when fully optimised. How much storage can you afford locally on your Mac for your fully optimised Photos Library? Let's say, you can tolerate 20GB of photos stored locally. Then keep no more the 100GB to 200GB of photos and videos in your iCloud Photos Library. This is just an estimate. It will depend on the file format of the full-sized originals. my iCloud Photos Library of 200GB has a file size of 35GB on my Mac with the least storage.
If you want to force Photos to optimise your Photos Library quickly, see this user tip: How to force Photos for Mac to Optimise the Storage Immediately