Take as many photos as possible from as many different angles as possible.
That’s maybe not particularly helpful, but one of the things that makes hymenopterans tricky to identify from photos is that there isn’t one standard perspective that will usually allow you to determine the species. In general it’s good to aim for a photo from the top and a photo from the side (this advice applies to most other insects also), but beyond that the relevant features are pretty unpredictable and may be just about any body part. Many keys rely on the area between the wings or where the thorax meets the abdomen (scutellum/propodeum), which is usually not feasible to photograph in a freely flying specimen. Males of many groups are traditionally identified based on genital extraction.
I wrote up some tips for photographing bees here (I keep meaning to put this in a journal post but have not yet gotten around to it): https://forum.inaturalist.org/t/tips-on-taking-pictures-of-bees/60536
Many of these things will apply to wasps in general, though I find bees are often somewhat easier to find and photograph than other hymenopterans (with the exception perhaps of ants) because of their flower visitation habits – though this depends a lot on the species. For other wasps, watching them and figuring out their habits can help you find an opportunity to get photos when they aren’t zooming around (I haven’t found a good strategy for pompilids or mutillids, as they rarely seem to stop moving).