For having a DNS name on the Internet, if you do not mind of having a choice between a couple of silly domain names like whateveryourname.mooo.com, you can use the services of dynamic DNS FreeDNS for free.
Basically you create a free account, and link it to a hostname of your choice suffixed to a couple of fixed domain names for the free tier accounts. Cant remember from the top of my head if the free tier allowed to define up to 6 different hostnames with one account/IP address.
Then they give you a daemon/URL to be accessed with a key, and each time you call it from your VM, the DNS name will be updated with your (dynamic) public address.
As in (demo example):
See my related question, for dealing with updating the name if the DHCP service gives you a different IP address with the VM/machine is online: Better method for acting on IP address change from the ISP?
Having then a DNS name that it is linked to the current IP address, it is far more easier to connect to a machine/service, especially when the IP address changes.
Bonus points: DD-WRT/OpenWRT, and I think PfSense, support FreeDNS on their firmware/OS.
FreeDNS is not the only one dynamic DNS name service with free tiers, you also have got No-IP https://www.noip.com