Templates have this section called “outputs”. When you display a resource deployment on the Azure portal, you can see the values of the outputs on the UI.
When you want to display the evaluated value for a variable, you can add it to the outputs section to display it after the template deployment is done on the Azure portal.
The outputs section looks like following. You can see the details on the ARM Template Language documentation.