An actually useful video I found on the topic:

watch on youtube

Reference also good, the wiki: https://wiki.archlinux.org/title/OpenVPN#The_update-systemd-resolved_custom_script

https://github.com/jonathanio/update-systemd-resolved

Now would be a good time to update /etc/nsswitch.conf:

hosts: files resolve dns myhostname

hosts: files dns resolve myhostname

You should also update your OpenVPN configuration:

setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin script-security 2 up /usr/bin/update-systemd-resolved up-restart down /usr/bin/update-systemd-resolved down-pre

or pass –config /usr/bin/update-systemd-resolved.conf in addition to any other –config arguments to your openvpn command.