Many DNS providers allow you to curl a particular URL to set the IP address for your domain. Set your server to curl it periodically, and it solves the lack of a static IP.
No good if your isp provided IP is behind an ISP nat. Eg via 3/4/5g Dongle. VPS can get you past that in a few ways.
Re:I don't need a VPS anymore
by treesknees on Thursday March 24, 2022 @12:01PM
(#30791735)
Alternatively, CloudFlare Tunnel can do this for free without the need for a VPS (assuming you're serving HTTP traffic only.)
Beyond this, it can also be impossible due to lack of a static IP or control over the router (5G internet service with CGNAT). A VPS with WireGuard and remote port forwarding allows access for things like SSH.