Panic Attacks Support Group
A panic attack is a period of intense fear or discomfort, typically with an abrupt onset and usually lasting no more than thirty minutes. Symptoms include trembling, shortness of breath, heart palpitations, sweating, nausea, dizziness, hyperventilation, and sensations of choking or smothering. Panic attacks can be very sudden, appear to be unprovoked, and are often...

If I were you, I'd reach out to my teachers and let them know what is going on with you; they may be able to help in ways that no one else can.
For anxiety attacks it helps to understand what you're feeling when it happens. In my case I felt shame and guilt. I thought if I was being yelled at it meant I did something wrong and if I did something wrong that meant I was bad. So I had to learn that my worth doesn't come from living up to others expectations. It doesn't come from being pretty or smart or talented. Just being yourself is enough. And believe you're enough by learning why you're enough. There's many articles online you can look up that will support this and help clarify.
I’m not sure if that’s how you feel or not and you can relate. But I do know that mentally stepping back and reminding yourself that you’re okay and breathing helps. And if you flat out cry, that’s okay too. I'm sorry, but being yelled at is jolting and is meant to evoke fear. So, yeah. Ya normal in my book!
If you talk with your teachers ahead of time and any of them lack care or understanding. See if you can switch teachers. It’s worth a shot.
For panic attacks I’d recommend excusing yourself to the school nurse. These come out of nowhere and mimic medical conditions so you need to be under watch and care.
And finally, bless you for dealing with school. It’s beyond tough!