There’s no gcc-toolset-11 on Rocky Linux 9. The default gcc package is already version 11.
[root@xmpp01 ~]# dnf info gcc
Last metadata expiration check: 2:31:49 ago on Mon 30 Sep 2024 05:08:50 PM MST.
Available Packages
Name : gcc
Version : 11.4.1
Release : 3.el9
Architecture : x86_64
Size : 32 M
Source : gcc-11.4.1-3.el9.src.rpm
Repository : appstream
Summary : Various compilers (C, C++, Objective-C, ...)
URL : http://gcc.gnu.org
License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Description : The gcc package contains the GNU Compiler Collection version 11.
: You'll need this package in order to compile C code.
If all you need is gcc 11, then you can install it as so.