Is it possible to block unwanted SMS messages?

Possible to block unwanted SMS messages?
Thanks
Re: How to block

Yes go into settings and go to phone and go to blocking
There’s another way. In the message thread you can tap on the number or name and choose info then tap on the > on the right top of your screen and then you will see Block This Caller on the bottom of the screen in blue
Thank you so much, yes Done

Original thread: https://forums.imore.com/threads/is-it-possible-to-block-unwanted-sms-messages.408792/