They work great but are only part of the solution.
Use the bits in your water that you use for watering the plants and in any standing water you have in humidity trays.
You also should spray with Neem Oil, Safer Soap, or something that targets the adult phase of the fungus gnat. Tacky fly type paper also works.
Finally and most importantly, the gnats feed on fungus that grows on decaying potting media and decaying plant roots.
Very unusual to have them feeding on the plant itself.
The best control of fungus gnats is fresh potting mix and healthy roots.
Thus, even if your plants look good, they may be in need of repotting and should have the media and root systems checked.
Remember, someone may wear a nice looking hat but it may be covering up a bad head of hair