If you're talking about something related to yellow jackets,https://en.m.wikipedia.org/wiki/Yellowjacket, then I'll offer two things.
One, my personal
experience. I dig them up in broad daylight, digging and burning simultaneously, using a weed torch. That kills the ones in the ground, the ones flying away, and the ones flying home. Nobody's left to sting you. You also lay bare the whole nest, so you're positive that they're completely finished right then. 100% effective for me.
Second option, someone told me about earlier this summer, right here on Permies. They said, put a clear glass bowl over the hole. The wasps exit, hit the glass, and stay trapped. They don't dig a new exit because the bowl is clear - I guess if you cover it with something opaque, they realize what happened and dig around it. So, clear bowl, they all stay in there and die. Seems pretty effortless, and it makes sense, but I haven't personally done this.
Heck, try both and tell us which one is better.