Hello,
You can find more information here:
Containers use kernel components from the host OS.
VMs have their own kernel. (virtualization)
A VM is not a container, but a VM.
So it is a Container vs Virtual Machine
For example, it is not possible to run Docker in unprivileged containers because access to the host is required. Because VMs have their own kernel, this is a safe alternative. I try to run everything in containers because of the efficiency. If this is not possible, then I create VMs. We don’t want that apps in containers can access and control the host OS or modules.
You can also google for containers vs vm’s for pros and cons.