Texts and imessage appearing on Mac
In your iPhone: Settings > Messages > Text Message Forwarding: you should see your Mac. Just uncheck it.

In your Mac: Messages > Preferences > Accounts: Just uncheck "Enable this account" or just "Sign out".

Be careful that you can attach iPhone and Mac also with an Apple ID different from the iCloud one, so you have to figure out what is the shared account and sign out from it.