You should no longer run CentOS 6. It is unsafe to do so as it is missing at least one whole year of security patches and the older it gets, the more insecure it will become. The yum repos for CentOS 6 have been moved to vault.centos.org where old CentOS releases go to die.
So what should you do if you still have CentOS 6 running? Migrate to something newer, sooner rather than later. There is no upgrade so perform a parallel install and migrate your services and data to the new instance.
- CentOS 7 is still supported until 2024.
- CentOS 8 is already EOL so, please, do not migrate to that.
- There are other RHEL rebuilds such as Rocky, Alma, OEL (Oracle), Springdale and possibly others that I have forgotten. If you want to run a RHEL 8 clone then use one of those in preference to CentOS 8
- If you like living on the bleeding edge then you could also look at CentOS Stream 8 which is now ahead of RHEL 8 and gets updates from the next point release of RHEL 8 before RHEL 8 does.