This problem came up quite a long time ago, but apparently can still occur on Catalina. If VirtualBox installation fails, or if you cannot open VirtualBox after installation, then have a look at this thread (includes screenshots):
https://apple.stackexchange.com/questions/301303/virtualbox-5-1-28-fails-to-install-on-macos-10-13-due-to-kext-security
A few extra notes:
- The "Allow" button only stays for 30 mins after attempted open, so attempt to open VirtualBox again if needed to get it back
- The "Allow" button should be there, even if you don't get a message to go to Security & Privacy (at best you only get the message the first time...)
- make sure to eject the VirtualBox installer .dmg before looking for the "Allow" button, else it may not work
- it may take a couple of goes and/or a reboot inbetween; you may even need to reinstall VirtualBox after clicking "Allow"