Current (2021-10-11) Debian testing cannot install Nvidia drivers properly. There [bug report 994860], which contains [a patch].
Here are the steps I took to apply that patch and make things work.
Download the fix-kernel514.patch
from this Gist.
Then run these commands:
$ sudo apt install nvidia-installer-cleanup glx-alternative-nvidia update-glx glx-diversions glx-alternative-mesa nvidia-support nvidia-kernel-common nvidia-modprobe xserver-xorg-core libvdpau1