Getting the NVIDIA driver installed on a Debian based system can be a major pain in the ass for those who have never attempted it. Here are simple to follow instructions for getting this to work on most Debian based system. Make sure to read all the directions before starting, there will be times when your system will act like the install has failed. It might also be a good idea to open these instructions on your cell phone so you have them when you don't have a handy GUI interface.
you may need to add contrib and non-free to the /etc/apt/source.list
sudo nano /etc/apt/sources.list
Change:
deb https://deb.debian.org/debian bookworm main non-free-firmware
deb-src https://deb.debian.org/debian bookworm main non-free-firmware
To:
deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
Make sure your system is up to date
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y
sudo reboot
sudo apt install linux-headers-amd64
sudo reboot
sudo apt install nvidia-driver nvidia-cuda-toolkit
a screen will popup talking about disabling the nouveau driver just select ok
sudo reboot
At this point you will either be good and your system will boot to your window manager. Or if your system is like mine, it will boot to a login prompt in the CLI. Fear not, hope is not lost.
Login to the prompt with your username and password and type the following commands.
sudo nano /etc/default/grub
change the following line...
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
to read...
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"
press CTRL+X then Y to save and exit nano
Back at the prompt there are two more commands
sudo update-grub2
sudo reboot
At this point all should be good and it should boot to your window manager