Gaining weight while pregnant 🤔

Virginia
Hello everyone! :) 
I just wanted to ask a question cause I'm a curious fourteen year old.  I was wondering how you keep your perfect weight while pregnant? Cause I know you crave so much and can't do much, I seen some moms work out and I have no idea how but when I'm pregnant I don't wanna be overweight or gain a lot in the pregnancy for the baby...  I'm sure I'd have to experience it for myself but I was just wondering 😊 
Thank you!