Are you allergic? Should you have an epi-pen (ask your doctor)?
Not much you can do to prevent stings. Something stung me on my neck a few weeks ago while I was riding. I stopped so fast and nearly tore off my jersey because I thought it had dropped down inside my jersey.
I've had buzzing flying things get stuck in my helmet. In those cases I stop as quickly as I can and calmly (as possible) take off my helmet so the offender can fly away. No stings on my head so far.
You can get stuff called Sting Stop and carry it with you. My grandmother always carried meat tenderizer powder on hikes and that works, too.