I would suggest that you use a virtual machine such as VMware Workstation, Windows Virtual PC, or Oracle Virtual Box.
You can get a Virtual Appliance with the OS installed and ready to run for many Linux OSs.
I personally have been using VMware for decades and run OCaml on Debian on VMware workstation.
Supplement
Since someone just upvoted this and I didn't recall the question I re-read it. Good thing because there is probably a better way to do this on Windows, but I have not checked it out, but will outline what I would do/ do do. :)
Install WSL (Windows Subsystem for Linux) AKA Bash on Ubuntu on Windows. This will allow you to run an Ubuntu environment on Windows without needing a virtual machine.
Next install OCaml on WSL by following the Ubuntu instructions.
Then follow the Ubuntu Linux install instructions for Real World OCaml.
Since WSL is not intended for use with a GUI, (but it is done often), use Visual Studio Code with the OCaml extension installed on Windows.
So the project directory with files and Visual Studio Code will be on the Windows file system and the OCaml environment will be on the Linux file system under WSL.
To use the files on the Windows file system from WSL just use a symbolic link.
Sorry for the terse explanation, but it is better than not knowing.