In Exchange 2019, like Exchange 2013 etc, you can use a wizard to configure all your External URL’s, take note this does not change the Internal URL or the Autodiscover URL, you can change the Autodiscover one as per this article.
Let’s go through the wizard that is available from within the Exchange Admin Center (EAC). Launch the EAC and then click Servers -> Virtual directories.
Now click the wrench icon to start the wizard as shown below:
A new window will appear:
Click the + button as shown above to select the server/s you want to use, another new window will appear.
Select your server/s and then click the add button, once done click OK to return to the previous window.
Now enter in the url you want to use, for example, mail.domain.com as shown below:
Now click the Save button to have it configure the following External URL’s for you:
Now if you click on one of the items like OAB etc, on the right hand side you will notice the External URL that was set:
Hope it helps.