Please use a package manager such as homebrew, pkgsrc, nix, or MacPorts
After download, go to the download directory and run the command chmod +x.Go to the page Assets section to download the file macos-guest-virtualbox.sh.Before you start to install, you had better change the VirtualBox default machine folder to the folder that saves this script file, you can refer to the article How To Copy VirtualBox Virtual Machine To Another Computer.