How to Install Nvidia Drivers on Rocky Gnu/Linux Distro
GNU/Linux Rocky Installing NVIDIA Driver
Hi! The linked Tutorial shows you Step-by-Step How to Install the Latest NVIDIA Graphics and GPU Driver in Rocky GNU/Linux Desktops.
And the NVIDIA Driver Rocky Linux Setup is a breeze, requiring just a few straightforward Shell Commands to complete.
Most noteworthy: following the NVIDIA Recommendations should be better to use the NVIDIA Linux Graphics Driver from the Rocky Linux Repository.

Follow instructions for the corresponding CentOS Release!