I use Textra, and all you do is long hold the message and select blacklist.
I believe in the stock messaging app you go to settings in the app, select spam filter, and manage spam numbers and input the number bothering you and it halts the spam texts or people you don't like in general.