How to Install Nvidia Drivers on Rocky Gnu/Linux Distro
GNU/Linux Rocky Installing NVIDIA Driver
How to Install Latest NVIDIA Graphics Driver on Rocky GNU/Linux desktops – Step by step Tutorials.
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!