I tried to install in a new Debian 12 LXC container in Proxmox. The sudo package is not installed per default on minimal Debian 12.
The script errored out when trying to create /etc/sudoers.d/gvm because the /etc/sudoers.d directory does not exist when the sudo package is not installed.
Installing sudo before running the script did solve the issue.
Fix: Add sudo package to the dependency / missing packages check.