How do I stop getting panic attacks?

Age old question . . Good morning. Unfortunately, the answer to your question is not that simple,because there are many causes/triggers for panic attacks (genetics, environment . . . work, family, financial situations . . ) Therapy/biofeedback may help you deal better with situational causes--over time.Medications may be necessary given the severity.There are self-help books, exercise. No one treatment helps everyone.
Panic attacks, or .. S- have you been diagnosed with panic? O- it has been my experience that many people call anxiety "panic attacks". There are many causes for anxiety. Medical issues, life stress, and depression to name a few. A-Anxiety, etiology unknown P-Consider getting lab work including a thyroid profile. There may be underlying reasons for your anxiety (trauma?) which may need to be addressed. Thanks you.
Therapy? Have you yet tried any form of psychotherapy? Typically, the optimal combination of things to treat emotional issues such as panic attacks, which are common is medication (which, on your best day, is supposed to take the edge off symptoms) but the real gruntwork takes place in psychotherapist's consulting room.