Mashal_Khan , this is a network issue between Exchange On-Premises Servers and Exchange Online Server IP Addresses (52.98.32.2 is EXO server where probably your target cloud user USER@INITIALDOMAIN.mail.onmicrosoft.comis hosted).
How are your Exchange On-premises servers going out on the internet? Proxy or Firewall? You seem to be blocking outbound connections to 52.98.32.2. If using proxy, make sure this is set on the Exchange Servers, you can do Get-ExchangeServer |FL identity, internetwebproxy to check if there and Set-ExchangeServer to set one. Make sure you allow all your Exchange Servers to connect to all EXO IP addresses https://docs.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide#exchange-online
You should follow Suggestions from Error 22, points 2 and 3 and make sure you can access from Exchange System Account (on each Exchange Server CAS/MBX) the following URLs:
https://autodiscover-s.outlook.com/autodiscover/autodiscover.svc ( EXO Autodiscover Service)
https://52.98.32.2/autodiscover/autodiscover.svc (continue to certificate error because we put ip)
http://autodiscover.<YOUR-INITIAL-DOMAIN.mail.onmicrosoft.com/autodiscover/autodiscover.svc (this should redirect to https EXO Autodiscover Service)
https://outlook.office365.com/ews/exchange.asmx ( EXO EWS Service, this can also be set on the TargetSharingEpr on the on-premises Organization Relationship when On-Premises IOC is disabled).