CentOS 8 is dead since the end of 2021 (while CentOS 7 still has support but is really really old). There are a few alternatives. You can upgrade to CentOS Stream, to AlmaLinux or Rocky Linux. CentOS Stream is an odd rolling release distribution that I’m not interested in (I already maintain Gentoo and Arch Linux boxes). I wanted to do a huge article about migrating CentOS to AlmaLinux, sadly that’s really simple:
dnf --assumeyes update sync reboot curl --silent --remote-name https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh bash almalinux-deploy.sh reboot
It’s a really good idea to review the script before you execute it. it basically updates the repositories and reinstalls all packages.