Is here is the guide.
FIrst of all go to Virtualbox [https://virtualbox.org] site. Click downloads and
download .deb. (as you know Elementary OS is ubuntu based system).
Next step is open terminal and install virtual box as follows
cd Downloads
sudo apt install ./virtualbox-6.1_6.1.26-145957\