The default Messages app (made by Google) has a feature to block Spam SMS messages. Check the video below on how it works.
If you are missing some useful (not spam) SMS messages, then do check your Spam folder. Open Messages app > 3-dots on top right > Spam & blocked. If you find a message that is not spam, then tap the message and then tap “Not spam”