These flies are born from little worms in the soil, they normally appear when we water too much and/or too frequently, these worms are harmful for your roots as they start eating around it, its not going to kill your plants but obviously its better to dont have them around, i would paste some typically yellow stickers, ask for them in your grow shop, and add some diatomaceous earth as these also kill them, stop watering that frequently, let the soil get completely dry and they will disappear slowly