Ubuntu 24.04 is security maintained for 10 years - no major version bumps just security updates the whole time. Installs lean, works great. I use it for exactly this.
I do this: https://github.com/rajannpatel/Pi-Hole-on-Google-Compute-Engine-Free-Tier-with-Full-Tunnel-and-Split-Tunnel-Wireguard-VPN-Configs
Ubuntu 24.04 is security maintained for 10 years - no major version bumps just security updates the whole time. Installs lean, works great. I use it for exactly this.