And how much storage is unused on your Mac? The "available" storage shown is including the storage used by iCloud to store the local copies, that could be purged to free storage for other apps. But it cannot be used, if iCloud needs more storage to keep smaller, optimized versions.
To see, how much storage is really still free, select the internal volume in the Finder and open the Info with ⌘i .
What does it show? The line "Available" will show you, how much of the "available" storage would eed purging to use this storage.
With only 50GB of "available" storage you will probably need to free storage by moving some large items to an external drive, as iCloud Drive and iCloud Photos are syncing all items to between iCloud and your Mac and keeping the items on the Mac identical to iCloud, so you will need the same amount of storage on your Mac as in in iCloud, unless you enable "optimize Mac Storage" for iCloud Drive and Photos.
Are you already using"Optimize Mac Storage" for Photos and iCloud Drive? with "optimize Mac Storage" enabled the size of the local copy of your Photos Library can shrink down to roughly 10% of the size in iCloud for the optimzed versions, but you will still need plenty of local storage for your photos.