Hello jessica: Since this is your first post here on PC, welcome to PsychCentral.
Of course the first thing you may want to do, if you haven't already, is to get yourself checked out medically.

But assuming everything is okay in terms of your physical health, then you may need to consider the possibility the memory problems you're encountering are the result of stress and anxiety.
Here are links to 11 articles, from PsychCentral's archives, on the effects of stress on memory along with articles on how to manage stress & anxiety including one on how to halt & minimize panic attacks:
The Impact of Stress – Psych Central
Stress Affects Learning and Memory
10 Practical Ways to Handle Stress
18 Ways to Manage Stress
Simple Strategies to Help Your Life Run Smoother (And Stress Less)
https://psychcentral.com/lib/20-tips...dium=popular17
https://psychcentral.com/disorders/a...isorder/?all=1
https://psychcentral.com/lib/9-ways-...dium=popular17
https://psychcentral.com/lib/15-smal...dium=popular17
https://psychcentral.com/lib/top-10-...s-for-anxiety/
https://psychcentral.com/lib/how-to-...panic-attacks/
I hope you find PC to be of benefit.