I think it has to do with gcc version, cuda 12.x is supported on gcc-12 and debian 13 provides gcc-14 as default.
gcc
gcc-12
gcc-14