Block messages from a specific person or number
-
In a Messages conversation, tap the name or number at the top of the conversation.
-
Scroll down, then tap Block this Caller.
To view and manage your list of blocked contacts and phone numbers, go to Settings > Messages > Blocked Contacts. See the Apple Support article Block phone numbers, contacts, and emails on your iPhone, iPad, or iPod touch.
https://support.apple.com/guide/iphone/block-filter-and-report-messages-iph203ab0be4/ios