I have used VirtualBox on various versions of macOS and have not had any problems. I would make sure you have the latest version of VirtualBox and have installed the extension pack.
It could be a permissions issue and macOS has a lot of them these days. You may need to open System Preferences > Security & Privacy > Privacy and add VirtualBox to several sections: Camera, Bluetooth, Microphone, Full Disk Access, Files and Folders.
Why have you not updated macOS? Mojave is old. Do you have a very old Mac? Maybe that is the problem. Maybe an old version of VirtualBox would work better on your old Mac and old macOS.