Source: grub2 Version: 2.06-4 This package build-depends on gcc-11; on amd64, this package can be built with gcc-11. If the package cannot be built on any architecture with gcc-11 because of a compiler bug, please file a report for gcc-12. Else, please update the compiler version.
You might even be able to update to the current standard gcc-12. However, this requires changing the package; a test build failed with dangling-pointer errors.