I've heard that if the USB ports stop working in windows they can be checked via linux. How can that be done? Does it matter which OS I install?
if the USB ports stop working in windows
Well, if you install a new version of Windows, you might find that your USB device does not work anymore (though most modern devices, which are designed to work with certain USB classes - such as HID devices, like mice or keyboards - use generic drivers and could still be working). If the device needs a custom driver, you might be out of luck though.
If there was ever a Linux driver for that device, you might be in luck. As far as I know, old drivers still continue to work.
You talk about 'can be checked via Linux', do you mean your device is not working anymore because of a failure? In that case, you can check if the device is still operating by plugging it into a Linux computer, and, in a terminal, type
dmesg. The plug event should appear at the end of the list of events. If it's working correctly, that is. If Linux recognizes it, you'll also find that (probably) a file name was assigned to it.