Nginx Mainline installation instructions for Rocky Linux EL9 or EL8 can be found in a tutorial by Linux Capable.
How to Install Nginx Mainline on Rocky Linux EL9 or EL8
Learn how to install, upgrade Nginx on Rocky Linux 9 or 8 by importing the official repository directly from Nginx.org and installing the latest version.
How to Install Nginx Mainline on Rocky Linux EL9 or EL8 - LinuxCapable