A GPU in a server isn’t there to draw a desktop, so the driver you want isn’t the desktop one. Ubuntu’s tool for this has a separate mode, and it’s easy to miss if you only know the plain list.
sudo ubuntu-drivers list --gpgpu
The Ubuntu Server documentation gives this for servers, next to plain sudo ubuntu-drivers list for desktops. Its sample output looks like this:
nvidia-driver-470-server
nvidia-driver-535
nvidia-driver-535-server
nvidia-driver-550-server
...
That is a shortened copy of the page’s list, which also contains -open variants. Installing works in two ways:
sudo ubuntu-drivers install --gpgpu
sudo ubuntu-drivers install --gpgpu nvidia:535-server
The first relies on automatic detection and installs the driver the tool considers the best match for your hardware. The second names a version. The docs say to use the version exactly as it appeared in the list output, so 535-server here, taken from nvidia-driver-535-server. The documentation then tells you to install the matching utilities with sudo apt install nvidia-utils-535-server.
I’d run the list first and read it before letting the automatic option decide. Without --gpgpu you are in desktop mode, which lists the desktop packages instead.
Caveat: the list depends on the hardware in the machine and on the apt sources, so your output will differ from the sample. This follows the documentation and was not run, because it needs NVIDIA hardware.
Further reading: Install NVIDIA drivers, Ubuntu Server documentation