Hi -
First, in Icloud, how much space is taken by photos. You can check from your phone.
How much space is on your mac (you will need more space than is in Icloud, because on the mac, photos needs a database and a bunch of support files (thumbnails, previews etc). I have 50GB in Icloud, but 84GB on my mac for the same photos.
Unless you have plenty of free space and we find a way of solving the message, your best bet might be to put your mac photos library on an external drive. If you do this, you will need one that is USB3 or faster (USB C and Thunderbolt will also be fine).
Also if you don't already have a backup in place, I'd also recommend getting a second external drive for a timemachine backup. Upgrading computers and phones is the classic way people manage to lose their photos (As I think you know which is why you want to have them downloaded) and in any case, if you value your pictures you should always have them backed up (Icloud is not a backup).
Then you can move your library to the external drive as described here (paying particular attention to the drive preparation):
https://support.apple.com/en-gb/HT201517
When you have your library on a drive with plenty of space, make sure it is set to the system library (Photos preferences) - enable Icloud photos on your mac, and everything will sync from Icloud into your library.
If you need any more help with any of this, feel free to get back.