I used to be the same way in my chemistry class, especially since a lot of chemistry at the level I was at consisted of maths knowledge, in balancing equations.
I'm not bad at maths as a whole, I just struggle with mental arithmetic, and if I'm not there with a pen & paper or a calculator, I'm struggling with even fairly basic equations. And of course, 9 times out of 10 the chemistry teacher is asking questions to do with balancing equations.
My advice though would be to talk to your teacher after class in private, and explain that you're having difficulty with answering sudden questions and it's making you rather nervous. And if you need help with chemistry altogether, then ask your teacher. If they're going too fast for you, they might not be able to adjust their teaching style, but they may be able to help you go over what you've learnt in after-class revision sessions.
Don't just sit there in silence, even if you're scared of your teacher.
I was absolutely terrified of my first year AS Chemistry teacher (she had a thick South African accent and a temper), and I wouldn't ask for help when I could've benefited, and I ended up with a grade C for my AS.
THen the next year I had a new teacher, who wasn't frightening, but was really rude and I swore she picked on me. She asked me if I wanted help, and I think mostly out of spite/pride I said I was fine, and then my efforts slacked. Eventually she stopped caring, basically said to my face that I would never be a chemist (or pharmacist as I was interested in at the time), and that was it. I didn't give a stuff anymore and started skipping lessons, among other things.
I ended up having wasted 2 years of college, and came out with a Grade E Chemistry A Level. It wasn't smart of me.
And all I had to do was ask a teacher for help, rather than sit there in fear or trying to spite my teachers.
here's the thing though, I've always been stuck on chemistry but not cause I didn't listen but because I joined public school once more january last year which has ended up giving me social anxiety, I did get help with it through the remaining part of that term and even sacrifice my break to learn (I stil would do and would love to)
I'm still stuck on the basic parts of chemistry like where the mass number or atomic number goes, hell I even had my prelim today on chemistry and I forgeted it because I spent too much time looking at basic atoms and not enough on moles
I did ask to stay behind and copy once but he got angry, reason I couldn't copy it cause I can't see the smartboard very well; poor eyesight
I sit there staying quiet trying not to spite the rest of the class and when we begin writing I'll then go ask for help, but I will NOT JUST SIT THERE doing forget ALL like the starfish that sits beside me if he's stuck which is REALLY off putting, like why put in the effort and get as good a grade as he will get? of course I don't do that but it really get's to me
honestly like a lot of school just deoends on me being confident enough to do something or not, I'm very easy to break down like OP is if I get scolded so I don't do anything just to avoid it ((like talking in class to ultimately make friends))