I had this same issue with my Debian 13 Docker VM. To fix this you need to install dkms and the matching headers for your new kernel:
apt install dkms pve-headers-$(uname -r)
Then re-run the .run installer as before. After that, verify DKMS is...
Every time the kernel is updated, I have to re-install the nvidia divers, they do not survive the update.
I install them by:
./$(ls -t NVIDIA-Linux-x86_64-580.126.18.run | head -n 1) --dkms --disable-nouveau --kernel-module-type proprietary...