Every spec-compliant USB-C charger should be able to charge every spec-compliant USB-C device. Some combinations of charger, cable and device will be able to charge faster than others. There's a sort of handshake happening between the charger and device when you plug them in, plus some resistors inside the USB-C cable itself. All together they let the device and charger determine how much juice can be sent down the wire.
The problem with the Switch is that it has some proprietary additions that aren't part of the USB-C standard. It has a USB-C charging port but isn't actually a fully USB-C compliant device itself. Some (typically cheap) USB-C chargers had problems after a Switch firmware update. Note that this was a Nintendo problem, really. After what was essentially a software update on the Switch side, chargers that previously worked were suddenly bricking Switch consoles.
This site has a bunch of recommendations for 3rd party chargers that have been found to work well with the Switch. You'll note that none of them are exactly dirt cheap, the lowest being $20 while the official Nintendo brick is the $30. The cost is not unwarranted as USB-C chargers have a fair amount of electronic complexity to handle power negotiation, and high quality components are important when charging at up to 100W. The original USB spec only handled 5W of power, for comparison.
Bottom line, if in doubt I'd stick with the original brick for the Switch. If you need a smaller form factor for travel (that original brick is a chunker!) then make sure you get one that advertises Switch compatibility, and don't cheap out too much.