The default Debian gpioget and gpioset definitely works. You probably modified something on the image and removed a library or something.
The official package is python3-libgpiod: Debian -- Details of package python3-libgpiod in bullseye
It is maintained by upstream and already integrated into Debian and derivatives proper.