Your texting app should have the option to "block" or "reject" text messages from any individual number.
View the conversation, select a message from the number to block, tap the 3-dot menu. block/reject should be an option, assuming a reasonable texting app.
+1 on the recommendation for "Textra" SMS app, if you don't like the app you are currently using.