When it comes to Rocky Linux, Virtualbox is not found on the main repositories, so installing Virtualbox can be done only via RPM fusion repository.
By having RPM fusion repository configured on Rocky Linux, you are able to download and install Virtualbox easily via dnf package manager.
In this article,