watering too often and not letting your soil dry out thoroughly. use a chunky soil mix (soil, orchid bark, and perlite mixed together in a big container) instead of indoor potting mix straight from the bag. that way you can ensure the soil will dry out thoroughly, the roots get plenty of oxygen, the roots don’t sit in most soil and cause rot, etc etc
you can also put a layer of sand, cinnamon, or a form of rocks on top of the soil to ensure they can’t come in and reproduce or come out once they mature. whenever you buy a plant, quarantine it away from your other plants for 1-2 weeks so it can acclimate to your home and ensure it doesn’t have any issues, then you’re free to repot. recommend potting in clear nursery pots so you can check root conditions while still sitting in a decorative pot
just keep an eye on them. your plants will tell you everything you need to know. if they need more or less water, more or less light, more or less humidity, colder or warmer temperature, if they have pests, etc. highly recommend going on tiktok or youtube and finding a few plant creators that you like and binge their vids! welcome to planthood 🫶
best way to get rid of them if you do end up getting them down the road, is letting your soil dry out, BOTTOM WATER, get YELLOW sticky traps, put something (like sand) on top of the soil so they can’t come in or out, water your plant WHEN ITS TIME TO WATER with a 1-4 hydrogen peroxide (1) water (4) ratio to kill larvae in the soil, and hope and pray lol. i also got an electric swatter and it’s helped. they like moisture, so if you just set out a glass of water, they will be attracted to it and
they don’t need to eat much so it’s not a big deal if they don’t have food for a bit. i have cape sundews and they do wonderfully in my apartment. obviously i still have the occasional fungus gnat fly at my face, but overall it does help keep the population down and it’s an excuse to buy another plant haha.