Hey Lucy,
The other members have already given you some great advice! I used to get panic attacks all the time, especially when I was a kid. One thing that really helped me was visualization. Whenever I felt an attack coming on, I used to visualize that I was petting my cat, and that really helped to calm me down. Listening to certain songs that I found calming was also a great help, so I suggest doing that if you're in a situation where that's available to you. And of course, breathing exercises are a great way to help prevent an attack. I would always get short of breath during an attack, too - try breathing in to the count of four and then exhaling to the count of four.
I hope this is somewhat helpful! Please don't hesitate to message me if you want to chat or anything.
I know panic attacks are absolutely awful. I'm very fortunate that I don't get them anymore, but I had them for years.
I wish you all the best!