Tried this once before in my life, and since then always kept a can of cheap old hair spray around to spray at yellow jackets and their kin. No one uses it in my family. I bought it for a buck several years back just for surprise stinging-flying-insect attacks. Nontoxic. Won’t hurt you or the kids or the pets. The yellow jacket / wasp / etc. just fall from the sky with their wings coated in goo.
Just got to use it again this afternoon. I had one that decided my outdoor storage area belonged to it now, and we had a tussle over it. Me and an old can of Aqua Net won in the end.
We have paper wasps in my house. A spray bottle full of water with about 5% dish detergent does the trick too. Can confirm it works on yellowjackets as well.