Yes. You can hide the message content in notifications for individual conversations by making that conversation private. To set a conversation as private, simply open it and tap the 3-dot menu on the top right and access the Conversation settings or Group settings. After that, turn on Private Conversation. For more info on private conversations, feel free to check this article.
On the other hand, most modern devices also allow you to hide all notification content when the phone is locked, if you are looking to hide the content for all conversations.