Check server status.
… Apple - Support - System Status
… System Status - Apple Developer
(All are 🟢 so probably not that. Not today.)
Confirm the Mac system time and date is correct. If not, reset that, and check again.
Restart the Mac into Safe Mode, and restart the ISP router, and check again. That shuts off various potentially problematic add-ons.
If this is the first Mac newly in a corporate network, contact IT and ask them to check connectivity to Apple.
Remove any add-on security apps, add-on anti-malware apps, add-on cleaner apps, and any similar, removing all per vendors’ instructions, restart the Mac, and test again. (Some of these might not remove cleanly, and some can or will leave corruptions.) Check again.
If you are in a country or region with national firewalls, those can potentially be involved here, too.
Contact Apple.