Blocking someone is an effective way to avoid receiving messages from them on your iPhone. In iOS, you can block phone numbers or contacts to stop receiving text messages or calls without needing a third-party app. Here’s how.
Source : How to Block Text Messages from a Certain Number on an iPhone