Create a new VM using the Centos 8 Latest ISO https://www.centos.org/download/
Swap to a sudo interactive session
sudo -iCreate a script with the following content and run as sudo
dnf install epel-release -y
dnf install gcc make perl kernel-devel kernel-headers bzip2 dkms -y
dnf update kernel-* -y
reboot nowInsert Guest additions CD and run as prompted then reboot.
Once back up check the guest additions are running with
lsmod | grep -i vboxConfig Guest Additions are running and toggle View > Auto-resize Guest Display