Hello I have had a similar problem, first make sure your phone is getting the text message through your cellular network and not over wifi, you likely are not able to recieve messages over wifi, next go to settings, cellular, and select "data connection" and on. You may also need to check "data roaming options" depending on if your carrier is in your area and limited Wi-Fi connectivity option in case your phone is defaulting to the Wi-Fi and refusing to use cellular. Make sure phone is not doing Wi-Fi calling either.
If this does not work contact your carrier's help number and see if your phone ask them to guide you in making sure your phone is properly set up to work on their network. If none of these work a factory reset might be necessary.