There are times when a virtual machine is something that is very useful especially when testing new unknown software or running a program that may be quality problematic, for example software written in C/C++ that could have bugs and cause a problem to the OS, such as an out of bound memory issue, and other errors, for example, running the PHP programming language though it has improved much over the years, is written in C/C++. Simply another reason why memory managed programming languages such as Python3 are sometimes better choices to develop software.
The CPU has to support VM virtualization, sometimes this has to be turned on in the BIOS of the computer.
sudo apt update
sudo apt install qemu-kvm virt-manager virtinst libvirt-clients bridge-utils libvirt-daemon-system
sudo systemctl enable --now libvirtd
sudo systemctl start libvirtd
sudo systemctl status libvirtd
sudo usermod -aG kvm $USER
sudo usermod -aG libvirt $USER
sudo virt-manager
Now you may install a Virtual Machine Operating System, such as installing LinuxMint within a VM while LinuxMint is your OS.