That looks like a mosquito lol not a fly. They suck your blood and make you itchy.
There are bugs sprays that can kill them but I don't think the chemicals from it would be good for your plants.
Or you can get a bug zapper...
They thrive in moist wet environments so if you have hydroponic system or wet damp places around it can be hard to get rid of them.