The same thing happened to me when receiving a new Iphone. It is super stressful because anyone who was sending you texts to your phone number... you never got them. Anyway here is the solution:::
Settings>Messages>Receive at>Click your apple ID (the email address) > Change Location.
For some reason I wasn't receiving my texts at my phone number because United States was not selected as a location. After this, if I remember correctly you need to select your phone number as the receiving address. If that doesn't fix your problem log out of your apple ID and log back in. Hope this helps!