The source code for elementary OS is available from their GitHub organization.
The easiest way to get the code is using Git.
To build the code you'd have to walk the dependencies and then build and install each one by following the build instructions in each project's README.
The instructions, as would be expected, assume you are using an Ubuntu base for the operating system, where getting all the dependencies for elementary OS is done through Debian and Ubuntu packages.
Otherwise, you'd have to build each dependency from source if your system doesn't provide packages.
On Windows, you're probably going to want to build this all on authentic Ubuntu to avoid hassles.
Use VirtualBox, VMWare, Multipass, Docker, WSL, or some other virtualization application to run an Ubuntu system on Windows.
MSYS2 and Cygwin are also available options.
You are probably going to have to compile a lot of dependencies from source and do lots of patching if you want to use MSVC, Microsoft's C compiler for Windows.