First of all: Did you do apt dist-upgrade
as well? If I remember correctly that is a new required step when upgrading to a new Debian release.
If that doesn't help, you could check if your nvidia-detect package version is the expected version, that comes with Debian 12.
If neither of these steps help you could disregard nvidia-detect and try the steps listed in the following link. It seems the firmware was moved to a separate repository compared to Debian 11. You might need to add that by hand. https://wiki.debian.org/NvidiaGraphicsDrivers#bookworm-525
To be fair this is not the first infamous fascist with a bad hairdo, but this one certainly raised the bar. It looks like a bowl cut, but with different size bowls used...