If someone is having a panic attack, you have two immediate things you need to do.
You need them to understand where they are. And you need them to understand that right now, they are safe.
The first one is the most immediate need. Most of the time, it will resolve the second issue on its own.
So, first up — don't go "Look at me! Look at me!" That's going to overload them even more.
You need them to say their name. It's grounding — it brings them back to themselves. "Tell me your name," even if you know them well. It's not for you, it's for them. This first step may take a few repeats before it registers. That's okay — be gentle, don't rush.
If their breathing is ragged or they can't catch it, this is a good moment to slow that down too. Get them to breathe out longer than they breathe in — count it with them if you have to. It won't fix everything, but it takes the edge off the physical panic while you keep working through the rest.
Once you get them saying their name, you've made it through to them. Ask them to repeat it — "again, what's your name." When they tell you, say "Good." A bit of praise helps more than you'd think.
Next, get them to tell you what day it is. If they don't know, tell them, then ask again. Get them to repeat it back — "my name is ___, and the day is ___." They've already started to be distracted from the panic, without realising it.
The next step is bringing them to where they are, right now. If they've called you, get them to describe their surroundings. "Look down — what's on the ground? Dirt? Grass? Tiles?" Ask about the pattern on the tiles. If you're sitting with them, ask them to point out something that's a colour — "tell me something that's green."
Get them looking around. Your goal is both distraction and pulling them back to the present, so they can see for themselves that they're safe.
Start asking about their plans for later today, and maybe tomorrow. By now, they should be a lot calmer.
.
.
.
This may not be the perfect system but its what I do for people in overwhelming situations.