when I was a teen I had the very same thing. Felt like a knife in my ribs. Hurt to breathe for a minute or so, then it went away. I was told exactly what your mom said , only my dad, a general doctor MD, called it "growing pains". He said it's common and not dangerous.
If it happened very much, and you had lightheadedness or other symptoms, I would ask to be checked out. Does your mom know how often it happens?
My dad never took us to see a doctor (him being one) . He always said, "leave it alone, you'll get better on your own." We'd have to be nearly on the floor unable to stand up to be sick enough to see a doctor. Yet, he cared for other people's kids day in and day out.