1. download and install virtualbox from
https://www.virtualbox.org/wiki/Downloads
choose OS X hosts from packages
2. download ubuntu disk-image/iso from
https://ubuntu.com/download/desktop
3. launch virtualbox
4. click on new
5. give a name like "ubuntu" vb will automatically choose relevant settings
6. continue->2GB or more ram ->create a virtual hard disk now
->VDI -> dynamically allocate -> give storage limit -> create
7. option click your newly created vm -> setting
8. -> storage -> click on empty under "Controller IDE"
-> click on the CD icon from "Optical Drive" -> "choose a disk file"
-> select the ubuntu iso that you have downloaded
it should be named like "ubuntu-20.04.2.0-desktop-amd64"
9. start the vm and continue to setup ubuntu
don't about the erase content warning, it won't erase anything
on host computer.
-----------------------------
for window size scalability you need to install guest addition
check this link
https://linuxize.com/post/how-to-install-virtualbox-guest-additions-in-ubuntu/