Hi
If you have all your pictures currently in iCloud, and just want to synchronise them with a Photos library on your mac, the easiest way is to create a new empty library on your mac, (in the pictures folder is the normal place, can also be a new external drive - BUT see below about how to set this up). Set this new library as the system library, and make sure iCloud photos is enabled, and your mac will then download everything from iCloud photos library into your newly created library.
Here is how:
Hold down the option key while starting photos, and click "create new". Name it Photos Library.photoslibrary, and locate it in your pictures folder (or a folder in your external drive). (First screenshot). (If there is already a library with that name in the pictures folder, you could just use that one rather than creating a new one)

Then open the new library - go into photos preferences (general tab), and click "use as system photos library" (second screenshot)

Finally in photos preferences iCloud tab, set it up as the final screenshot. (You need to have enough space on your mac to download all the photos from iCloud)

Using an external drive
The drive MUST be formatted APFS or MacOS extended (journaled) - use the latter for a spinning hard drive. Also make sure the "ignore ownership checkbox is checked.
I'd also recommend creating a folder to put the library into rather than just storing it in the root of the drive.
More detail:
It must be formatted APFS or MacOS extended (journaled) (preferred for spinning drives)
It Must not be (or have been) used for time machine. (A time machine drive can be used if re-formatted)
It must have the 'ignore ownership" checkbox ticked.
It should not be on a memory stick, SD or similar.
It must also not be a network drive (a direct connection is required - eg USB or Thunderbolt).
File sharing services such as iCloud Drive, Drop box, Onedrive etc are not compatible with Photos libraries.
It stands to reason that if you want any sort of reasonable performance it should be a fast drive with a fast connection.
See
https://support.apple.com/en-gb/HT201517
