Block messages in Messages on Mac
You can stop receiving messages from certain people in iMessage.
Block messages from a specific person or number
In the Messages app on your Mac, select a conversation.
Choose Conversations > Block Person, then click Block.
Manage blocked callers
In the Messages app on your Mac, choose Messages > Preferences, click iMessage, then click Blocked.
Do one of the following:
Block a contact: Click the Add button , then select a name in the list of contacts.
Remove a blocked contact: Select a name in the list of blocked callers, then click the Remove button .
See the Apple Support article Block phone numbers, contacts, and emails on your iPhone, iPad, or iPod touch.
Tip: Another way to prevent unwanted people from bothering you is to set up communication with your contacts only.
Also, you can set options in Notifications preferences to turn off all notifications for Messages, change how the notifications appear, and more. To pause notifications from Messages, turn on Do Not Disturb or another Focus.