I would suggest that you use a virtual machine such as VMware Workstation , Windows Virtual PC or Oracle Virtual Box .
You can get the Virtual Appliance with an OS installed and ready to run for many Linux OSs.
I have personally used VMware for decades and run OCaml on Debian on a VMware workstation.
Addition
Since someone just supported it, and I did not remember the question that I re-read. Good, because there is probably a better way to do this on Windows, but I have not tested it, but will tell you what I will do / do. :)
Install WSL (Windows Subsystem for Linux) AKA Bash on Ubuntu on Windows. This allows you to run the Ubuntu environment on Windows without the need for a virtual machine.
Then install OCaml on the WSL by following the Ubuntu instructions .
Then follow the instructions in the Ubuntu Linux Installation Instructions for Real World OCaml.
Since WSL is not intended for use with a graphical interface (but this is often done), use Visual Studio code using the OCaml extension installed on Windows.
Thus, the project directory with files and Visual Studio Code will be in the Windows file system, and the OCaml environment will be in the Linux file system under WSL.
To use files in the Windows file system from WSL, simply use the symbolic link.
Sorry for the brief explanation, but this is better than not knowing.
source share