Great question — answering as the UphillTech team:
It depends on which system you're using for managing network configuration: plain kernel or systemd-networkd is rather optimized for use cases where the IP(v6) addresses are either static (and DNS registration is handled elsewhere), or anonymized (and you don't particularly want yourself identified). Even so, there would be event interfaces you could plug into and listen for change events - but it would be a bit more complicated than just dropping a shell script in a particular directory. But if you are e.g. using NetworkManager, then you can place scripts in /etc/NetworkManager/dispatcher.d that will be called with appropriate parameters on any relevant events; see man...
Full answer by telcoM: https://unix.stackexchange.com/a/807287 (CC BY-SA 4.0).
Need it done for your business? UphillTech.