With ArcGIS Enterprise version 11.4, the Update Organizational URL capability is introduced. I believe which enables to update the public facing URL changes in the organization.
To achieve this, first, we have to update the federation URLs for each GIS Server from Portal REST end (Org ID > Server > Update Server) then Portal URL from Portal REST (Home > Portal > Self > URL), correct? Referred to: Update the organization URL.
Also, does this update the URL for all the items on GIS Server (hosted and non-hosted) or do we need to manually update it for each item? Referred to: /updateFederatedServerUrl: Update Federated Server URL.