In the old days, if you had an ISP that changed your IP address all the time but you wanted to run a server, you used dynamic DNS, i.e. a hacky script talking to a hacky API on an hacky DNS provider.
These days, if you bring up a cloud server from time to time to work, it is likely to get a different IP address. But you might want a DNS record pointing at it so that it is convenient to talk to.
Same problem, different century.
Here’s my solution for a GCE server and a domain fronted by CloudFlare.
It has nella.org hard coded in it, so YMWDV (your mileage will definitely vary).