Hi Adham,
There is a pre-reqs can you make sure that Internet Explorer Enhanced Security Configuration is set to Off.
Verify that the connector machine can connect to the Application Proxy registration endpoint as well as Microsoft login page.
Open a browser (separate tab) and go to the following web page: https://login.microsoftonline.com, make sure that you can login to that page.
Also check this - The Connector installation logs can be found in the %TEMP% folder and can help provide additional information on what is causing an installation failure.
Verify that the user who tries to install the connector is an administrator with correct credentials. Currently, the user must be at least an application administrator for the installation to succeed.
==
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.