The error occurred on my Debian 12 also well.
Driver: 525.147.05 (from Debian repo)
It happened when updating to kernel 6.1.0-18-amd64.
https://forums.debian.net/viewtopic.php?t=158200
EDITED:
On Debian, upgrading to kernel 6.5 (from backports) fixed the nvidia issue when using kernel 6.1.0-18-amd64 and dkms:
sudo apt install -t bookworm-backports linux-image-amd64
sudo apt install -t bookworm-backports linux-headers-amd64