If you get following error while using yum in your CentOS 8 VPS
CentOS 8 - Failed to download metadata for repo 'AppStream'
Just run following commands as root to fix it:
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*