There is an official, made by RedHat, package with git 2.27 available for both x86_64 and ARM64 available in Software Collections.
You can install it with:
yum install -y centos-release-scl-rh
yum install -y rh-git227-git
Note that by design it is installed under /opt
and is not in your PATH by default.
You can easily make it the preferred git binary f.e. with a symlink:
ln -s /opt/rh/rh-git227/root/usr/bin/git /usr/local/bin/git
UPDATE: oups, sorry, while this package is a worth consideration way to go, it’s not that easy to use software collections. You have to enable the collection, I will update the answer later.