How are you connected to the internet? Are you using a cellular hotspot or are you connected to a Wi-Fi? The error message you are quoting suggests, that Photos cannot connect to iCloud Photos Library to download the original versions of your Photos.
iCloud Photos Library needs a Wi-Fi connection to be able to download photos. And the connection to iCloud must not be blocked by a firewall or antivirus software. Do you have any third-party security software installed? If yes, disable it. restart your Mac and try again to export photos.
Could there be any problem with your AppleID or iCloud Storage? Are you using more storage in iCloud than you have signed up for? Sign into your iCloud account in System Preferences > iCloud and check, if there is a problem. Sometimes the credit card has expired and you need to update your payment method.
This page describes the preference settings for the system preferences and Photos preferences. You may want to check. if they are still correctly enabled: Use iCloud Photos to store photos in iCloud - Apple Support