If you're using iCloud to sync your Messages between your iPhone and Mac, it's easy to unlink the two devices if you want to. Just follow these steps:
Open the Settings app on your iPhone.
Tap on Messages.
Tap on Send & Receive.
Tap on the info button next to the email address or phone number that you want to unlink from your device.
Tap Unlink This Phone.