Thanks for your question.
This is likely as a result of TLS 1.2 not being selected and used by Connect. Run the script below to enforce this:
The above should fix the issue.
A lesser possibility is if you have a proxy. In that case see: https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/tshoot-connect-connectivity#connectivity-issues-in-the-installation-wizard
You can mark it 'Accept Answer' and 'Upvote' if this helped you
Regards,
Abiola