How do I know which NVIDIA driver I need?

To check which is the recommended driver for your Nvidia card run:

ubuntu-drivers devices

If you want to install the driver automatically, run :

sudo ubuntu-drivers autoinstall

If you want to install a specific driver version (410, 440...), run:

sudo apt install nvidia-<driver number>

Once the installation is finished, restart your PC.
Then run prime-select query to check which graphic card is being used by your device.

If you want to change the graphic card used by your PC, run : sudo prime-select <intel/ nvidia>; choose between Nvidia and Intel graphic cards.
After that, restart your PC to apply changes