If you are concerned about isolation my suggestion is to use Docker.
Vagrant manages virtual machines. It allows you to script the virtual machine configuration and its provisioning. But still, it is a virtual machine depends upon virtual box.it requires you to have a hard drive file which can be huge. It requires huge ram and its performance is not good with these constraints.
Refer to this documentation of vagrant: https://www.vagrantup.com/docs/
On the other hand, Docker uses the kernel cgroup and namespacing via Linux containers
Which means you are using the same kernel as the host and the same file system. Docker can be build using dockerfile and docker build command to handle the provisioning and configuration of your container.
Refer to this documentation of docker: https://docs.docker.com/
The main thing we use vagrant is for Berkeley Software Distribution in windows or other non-Linux development on your Ubuntu box or else you go with docker(will be more helpful in terms of isolation).