You shouldn’t be using kernel 3.x anymore, you need to clean your system up and remove the old packages. Then it would work.
You should be booted on kernel 5.14 in Rocky 9, and at least 4.18 in Rocky 8. Yours isn’t.
Rocky don’t support upgraded systems, especially from CentOS 7. It’s recommended to clean install and move your data from old systems.