There is an old and fast part of the brain whose only job is to notice danger. It is often called the amygdala, and it works in fractions of a second, before language, before reasoning, before you have consciously registered anything at all.
Sitting over it is the prefrontal cortex — the part that plans, weighs consequences, holds perspective and chooses. It is slower. It is also the first thing to go offline when the alarm is loud.
The alarm and the thinking brain
This is why "just calm down" so rarely works, whether it comes from someone else or from you. In that moment, the part of you being addressed is not the part that is in charge.
What does help is anything that reaches the body or re-engages language: naming the feeling in specific words, slowing the out-breath, moving, cold water, or the steady presence of someone else.
Flipping your lid
A useful way to picture it: make a fist with your thumb tucked inside your fingers. The thumb is the alarm. The fingers folded over it are the thinking brain, keeping things regulated.
When the load gets too high, the fingers lift. That is a flipped lid. Reasoning cannot reach you until they come back down — which they will, given a little time and safety.
Nothing is broken when this happens. It is a fast system doing an old job.