Help needed with a galore of flies in my garden
I belong to Pakistan, where temperatures are soaring right now. I have noticed that the number of flies has increased in my garden. Due to high temperatures, the soil is mainly dry. Around 60% of the garden receives only 4 hours of sunlight, and the other bit receives higher numbers. We have two gallons outside, placed closed to the garden that collect water coming from the ACs that we repurpose to clean our porch. Those two waters were filled to the brin today, and the number of flies close to that region (the flies were on the plants) was insane. I did a pesticide spray on them, but I am curious as to what is causing this problem and what's the long-term solution. Also, my garden is pretty clean so there are no food scraps lying here and there, and the part of the garden that receives greater hours of sunlight saw less flies than that which only gets a few hours.
If you have any advice or input, please share because everything is valuable to me.