One recommendation for an Org Migration is to avoid hardcoded references. The thing is that I have a a snippet of the my chatbot code (embedded services) that has a hardcoded references. I also have a public site that has a hardcoded reference. For what I've found, Site for example can change its name from a hardcoded reference to a relative reference using MyDomain. The thing is that for that I need enhanced domains enabled and I think I don't have it. Is there another way to change all the hardcoded references to relative references using MyDomain or somethin similar?
Another potential option if a formula can't work is to use a custom setting. You can create a custom setting with a text field and then store the domain of your org in that custom setting. There is still hardcoding in a sense, in that you need to grab the domain and populate it in the custom setting, but in the underlying code you can reference the custom setting once, without having to update it in each org. Instead, you just update the values stored in your custom setting.