Good day!
Specify the conditions of the problem. In general, the best option is to learn Linux. In it, this problem is solved once or twice. You can install Linux on a server with Windows. For this you need to use virtualization. From what comes to mind - virtualbox and hyper-v. Virtualbox is more suitable for desktop use - debugging, development, all sorts of experiments. In principle, it can also be used for servers, but not optimally. For server use, hyper-v is better suited. Do not be afraid - it is not so difficult.
To run the program as a service under Windows, you can use the srv2any utility, which allows you to make a service out of any program.
The windows server itself supports multitasking. There are no problems with this. The solution is to connect to the server by teamviewer and run the program in a session on the physical desktop or you can run the program in the RDP session (and then not close it), but these options are suitable for some very simple applications. And to ensure the smooth operation of the service, I recommend it to be properly designed from the beginning.
goyet. And about the server, at the same time start exploring linux-like ones, you might also be pleasantly surprised by the ease of installing heaps of libraries. - Vladimir Gamalyan