Greetings -eali55,
If your iPhone has iCloud Photos enabled, you can download the photos online using a web browser. Check out that information in the following article:
Download iCloud photos and videos - Apple Support
"On your Mac or PC
- On iCloud.com, click Photos and select a photo or video. Hold the command key on your Mac or control key on your PC to select multiple photos or videos.
- Click and hold the download button
in the upper corner of the window. If you want to download your photo or video as it was originally captured or imported, choose Unmodified Original. For JPEG or H.264 format — including edits, and even if it was originally in HEIF or HEVC format — choose Most Compatible.* - Click Download.
If your photos download as a ZIP archive, learn how to uncompress the folder on your Mac or your PC. "
You would need to enter the passcode to retrieve the photos when the iPhone is connected to your Mac, unless the iPhone is trusted with your Mac. See that information here:
About the 'Trust This Computer' alert on your iPhone, iPad, or iPod touch - Apple Support
"Trusted computers can sync with your device, create backups, and access your device's photos, videos, contacts, and other content. These computers remain trusted unless you change which computers you trust or erase your device."
If unable to access the photos, then service will be needed. The following articles will help you to prepare and arrange service for your iPhone:
Kind regards.