Zend certified PHP/Magento developer

Old mac in Virtualbox on new mac

I currently use a iMac Mini with macOS Venture. I have some older software that I ran on my previous Mac that I would like to use that won’t run on my new machine. Can I set up a VM in VirtualBox to run my older version of macOS X. I was using macOS elCapitan. Thanks for help.