DNF throws "Failed to download metadata for repo" after fresh Rocky Linux 9 install

Hi all,
Recently I joined excel dublin and I just finished installing Rocky Linux 9 on a new server, but when I try to run dnf update or install any package, I get this error:

Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

I’ve already checked my internet connection (working fine) and tried clearing the DNF cache using dnf clean all, but the error still shows up. I didn’t modify any repo files manually.

Is this a known issue or something I might’ve missed during installation? Would really appreciate some help getting package updates working.

Thanks in advance!

As Root.
dnf config-manager --dump appstream