When after EOL, you use yum command will encounter an error like this.
"Cannot find a valid baseurl for repo: base/7/x86_64"
If you still need to use yum to update the latest and/or prepare to upgrade to other linux then you can edit the file.
/etc/yum.repos.d/CentOS-Base.repo
Please backup the existing one.
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old
and then create the new one.
vi /etc/yum.repos.d/CentOS-Base.repo
press i for insert
copy and paste the info between the two dash lines
---------------------------------------------------------------------
# /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://vault.centos.org/7.9.2009/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
---------------------------------------------------------------------------
press <ESC>
use command to write and quit the vi.
:wq
When you back to command prompt. You can use yum update again.
God bless you. Good luck!