How did you do the upgrade? Rocky 8 and 9 are seperate distros and an upgrade is not supported. Maybe it can help to read the following topic:
Update Rocky Linux 8 to 9 - Rocky Linux Tech Help - Rocky Linux Forum
There is also an upgrade guide linked in the topic:
How to Upgrade from Rocky Linux 8 to 9 (linuxiac.com)