Many companies offer free dynamic DNS. But since I use DomainDiscount24, I also use their dynamic DNS service. To update the IP address of vpn.jeltsch.org, I need to send an https request to a specific URL, including a password and the hostname for which I want the update:
https://dynamicdns.key-systems.net/update.php?hostname=vpn.jeltsch.org&password=12345678&ip=auto
To automate this, I use the crontab of my pfsense router. Editing the crontab is not enabled by default, but you can download and install the cron package. After that, you get a GUI under "Services > Cron", where you add the timing and the command:
/usr/local/bin/curl "https://dynamicdns.key-systems.net/update.php?hostname=vpn.jeltsch.org&password=12345678&ip=auto"