Disabling Messages on Desktop
Launch Messages. Go to Messages > Preferences. Click on Accounts. Then, click on your Apple ID and deselect "Enable this account". It will keep all messages from going from and to your Mac.