Is the system version below your question still valid? "iMac 21.5″, macOS 10.13"? The error message might indicate an invalid certificate for Safari on High Sierra.
Just a hunch - are only the photos taken with the iPhone not uploading, but screenshots or saved photos do?
Do you by any chance having My Photo Stream enabled on your iPhone to transfer photos? Which system version is running on the iPhone? If you are using iOS 15.4.1 on the iPhone, the Settings > Photos > Formats may have been set to "High Efficiency" by default, and My Photo Stream will no longer transfer your Camera photos as My Photo Stream cannot transfer HEIC and iOS 15.4.1 does no longer automatically convert HEIC to JPEG when adding the new photos to My Photo Stream.