This page explains how to install VirtualBox on Ubuntu.
Source

Install the Oracle public key

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

Add the repository

. /etc/os-release
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian $UBUNTU_CODENAME contrib"
sudo apt update

Install VirtualBox

sudo apt install virtualbox-6.0

Tested on