Waking up from sleeping panicking?

I had a dream I can’t remember what it was. But I woke up feeling like nothing was real like I was dead or something? And I ran to my mom’s room and she was sleeping and I came back to reality but was shaking while going back to sleep. I hate that this happens to me! It happens like once a year.