Everyone knows the usual anxiety symptoms such as fidgeting, being worried, etc. but there are many physical symptoms, some of which are lesser known. Anxiety can actually cause the throat muscles to contract the same way they would when your gag reflex is triggered which means severe anxiety can cause you to gag or even throw up.
It seems like this symptom isn’t talked about enough. As someone who has personally dealt with this, sometimes people do not believe it can happen and they assume you are being dramatic. It isn’t only that you feel so anxious you could throw up, it is your body physically reacting to that anxiety.
A few things that could help when this happens is focus on your breathing, try drinking some water, and giving yourself a break.