The reason is probably because the chrooted environment can’t resolve DNS.
Test it with
If it is not resolving, edit “/etc/resolv.conf” and change/add your nameserver. Or just replace everything in it with
echo "nameserver 18.104.22.168" > /etc/resolv.conf
It should now be able to resolve and you should be able to use yum, or dnf.