How do I download all photos to a HDD from iCloud?
Go to https://privacy.apple.com/account , sign-in and request download for photos. 

Another method can be to allow Download originals to Mac in Photos app preferences and then go to /Users/yourname/Pictures/Photos Library.photoslibrary/Masters after all the photos are downloaded. 


  You can request a copy of the data that Apple stores which is
  associated with your Apple ID. This information includes, but is not
  limited to:
  
  
  Your Apple ID account details and sign-in records.
  Data that you store with iCloud such as contacts, calendars, notes,
  bookmarks, reminders, email, photos, videos, and document.
  


from https://support.apple.com/en-in/HT208502