If you want to swat them, you need to move your hand slowly at first. They seem to not notice or care if you move slowly and don’t cast a shadow over them as that will frighten them. I use these same techniques for macrophotography, and it works, but you have to be patient.
I could also recommend getting good at snaping towels. Once you get good at it and you can judge distances, you can hit flies mid-flight.
Or if you just want to buy something and have 50ish bucks to spend you can get this