@pikachu_sensei @vkc what you are talking about is "dynamic DNS"( DDNS).
To make this work you will need:
- a domain, hosted somewhere that supports DDNS
- some automated way to check your external IP
- then take that IP and update your DNS record(s) with that IP
Some router manufacures make this easy by giving you a sub-domain under something they own, and built-in functionality to update it.
Some platform providers like linode make it pretty easy to update DNS records via an API call.
I hope the above would at least serve as sufficient info to at least get a sensible search going