But also consider simply using a distro/spin that has all the drivers included (or automates the install), such as Nobara, or one of the Fedora Universal Blue distros.
Both Debian and Ubuntu come with nonfree firmware blobs by default. Nonfree drivers such as the Nvidia proprietary driver can be installed graphically in Ubuntu if you open the drivers app.
Debian instructions are here and involves adding the non-free contrib repos to your /etc/apt/sources.list and then installing the nvidia-driver package