My partner does all the stuff mentioned by other posters; bottom watering, mosquito bits solution, a carnivorous plant with sticky leaves.
Still have gnats!
One thing I have seen her use are sticky gnat traps
[Like these](Effective Fruit Fly Trap - Yellow Sticky Traps for Gnats and Plants - Get Rid of Fruit Flies with Gnat Sticky Traps - Perfect for kitchens, patios, picnics https://a.co/d/1e1qeC1)
They are the only thing I have seen that cuts down on them.