Hi @Hossein,
Welcome to the Microsoft forum.
Based on your description, the error may because that the external URL is not configured properly.
To work around this issue, you should check the external URL for the following virtual directories:
Get-WebServicesVirtualDirectory -server YourExchangeServerName | fl name, url
Get-AutodiscoverVirtualDirectory -server YourExchangeServerName | fl name, url
Get-ActiveSyncVirtualDirectory -server YourExchangeServerName | fl name, url
If the external URL is blank, assign a value to the external URL that corresponds to the public FQDN.
More details just follow the article: Autodiscover Event ID 1 after installing Exchange Server 2019 CU3 or Exchange Server 2016 CU14 - Microsoft Support
Hope this helps.