Try to find out what software/environments they’ll be using to teach the course, and match that. In my course we mostly used Linux environments in the labs, and having an equivalent environment on my machine meant not being tied to the labs for big chunks of the practical work. I could complete an assignment from bed, while others were burning the midnight oil in labs that stunk of pizza and body odour leading up to assignment due-dates.
But know that eventually in your career, you’ll probably end up working on all the major OSs at some point, so there’s no “wrong” choice. As a general guideline, Windows is the best environment for .Net development, OS X is the best environment for Swift/Objective-C, and Linux is the best environment for most open-source frameworks, Docker stuff, Python, Node.js etc. (though OS X runs a close second for most things Linux is good at except Docker).
If you can, I’d strongly suggest looking at virtual machines/containers for your dev environments. You may decide they’re not for you, but they do offer the flexibility to install and configure all kinds of weird and wonderful things without risking the stability/maintainability of your machine.