Hi there Jarmaracark,
We see you need help with unpinning contacts from your Messages app on your Mac. First, we'll refer to the helpful guide that walks through this here: Pin a conversation in Messages on Mac
To unpin a conversation, drag it out of the section or Control-click it, then choose Unpin.
When you try to do that, if the result doesn't unpin what you are selecting, reply back with what specifically happens. Also, try restarting your Mac, then unpinning. Sometimes a restart will resolve an issue.
Best regards.