macOS has the best low-level APIs for audio and 2D graphics. This makes it ideal for music production and for graphic design/UI design. Hardware is very reliable (if overpriced) and I can make a mac continue to be useful for nearly a decade without failure. In fact, failure is rarely the reason for putting a Mac out to pasture, it’s generally because technology really has moved on and more juice is needed. Apple is the usability king, generally macs require less customization to make them usable.
PCs for Windows and Linux have better price/performance ratio. With class-compliant hardware, drivers are less likely to be an issue as they once were. Windows computers have the most flexibility with regard to hardware choice, especially with regard to GPUs (very important if you’re doing anything graphically intensive, or if you’re using machine learning libraries).
Linux has the most flexible OS and package system. Best choice for servers, or for development of server-side software. Typically requires extensive customization in order to be usable, but YMMV. Can be the cheapest option, although all platforms play host to open source/free software if you want to go that route.
I typically use Macs for most things (ordinary internet use, my day job of UI design, music production). I use Windows for gaming, 3D graphics/VR, and specialized GPU programming (machine learning). I use Linux for web server stuff.
For music there are also an ever-multiplying array of microcontrollers/embedded systems that are increasingly powerful and useful, and can be much cheaper than general purpose computers. Sometimes these systems run Linux.