How can I prevent text messages going to my Mac?
Open Messages.app from the Applications folder, or Spotlight (⌘-space).
Open the Preferences window from Messages → Preferences or press ⌘,


Select the Accounts tab.


Select your iCloud account and uncheck the Enable this account option.