Photos can’t be transferred directly from iCloud to an external hard drive for that you need to set up iCloud photo library see the article https://support.apple.com/en-in/HT204264
And its preferences https://support.apple.com/en-in/guide/photos/pht5156cc968/4.0/mac/10.14 , open finder > Go > home > your user name > pictures either drag and drop Photos Library.photoslibrary to an external hard drive , the second method is right click on Photos Library.photoslibrary and click on show package contents in the upcoming column , you can also drag and drop complete masters folder to an external hard drive that is connected .
Also as per the article https://support.apple.com/en-in/guide/photos/pht6d60d10f/mac
Read this : Back up the library in Photos on Mac - Apple Supportsupport.apple.com › en-in › guide › photos › Mac
Restore a library from Time Machine in Photos on Mac - Apple ...support.apple.com › en-in › guide › photos › mac
See some articles to reduce the data https://support.apple.com/en-in/HT204247
https://support.apple.com/en-in/guide/macbook-air/apdb468896e0/2019/mac/10.14.5
https://support.apple.com/en-in/HT206996
https://support.apple.com/en-in/guide/system-information/syspf5a64aa6/mac
Note : the devices iPad / iPhone and Mac are synced with same Apple ID and password on the same network with iCloud.com you delete the photos from any device or iCloud.com the photos will be deleted from all and moved in recently deleted folder and kept for 30 days and deleted from server after 30 days , for your iPhone / iPad you can create an album https://support.apple.com/en-in/guide/iphone/iphc0fc668ab/ios
https://support.apple.com/en-in/guide/ipad/ipad99c6ec9e/ipados