How to swap USB devices between Windows PC and MacBook Pro?
Let me guess, the USB switch looks something like this one:
I suspect the reason the USB switch is not working any more is because the switch was designed in a way that violated the USB specification, using USB-A ports for both input and output, and you bought a cable for it that adheres to the USB specification.
Using USB-A ports for input is not just violating the USB specifications but is a potential fire hazard. The USB-A to USB-A cables that your switch almost certainly came with will connect the power supply pins straight through, if these cables are mistaken for cables that do comply with the USB specification (which will comply by not connecting the power supply pins) and are used to connect two computers together the cable will short circuit the power supplies and potentially break or burn something. A USB-C to USB-A cable that complies with the USB specification, which is most likely the kind you bought, will not supply power to the USB switch. No power to the switch means no power to the devices, and no power to the devices means they will not work.
Again I am speculating here because you did not provide a description of your USB switch. I've seen these kinds of switches before, they appear to be popular. They are likely popular because they are cheap. They are cheap because they used a cheap design that does not meet the USB specifications.
What should you do about it? Throw away the switch and the cables, then be thankful they didn't cause damage to anything. Then buy a USB switch, or KVM switch, that meets the USB specifications. How do you know the product meets the USB specifications? Look for USB certification on the box or in the product description.
The USB connectors should have the trademarked icon.
It's not illegal to sell cheap junk but it is illegal to put trademarked icons on items for sale without permission. Cheap junk will not get the attention of lawyers but use of trademarks without permission will. These products that violate the USB spec remain on the market by not using any trademarks, and through clever wording of their claims. They claim, "Compatible with most USB devices." It doesn't work with your USB device? Well, they didn't claim it was compatible with every device. They didn't claim to meet any testing for compatibility. Or claim to meet any testing for safety. It's sold "as is", if it doesn't work for you then that's on you.
One more time, I'm speculating on the source of the problem since you didn't specify the model of USB switch you have, I'm making an educated guess. It appears you already suspect the USB switch is the source of the problem and I agree.