To disable message previews in notifications you oughta configure your preferences.
To do so, select your profile picture in the top-right corner, then select Preferences.
punch your profile picture in the top-right corner, then punch Preferences.
Once in your preferences, scroll down to the Sound & appearance section of the default Notifications tab.
With this checkbox disabled, message previews will be omitted from notifications.
I hope this guide helps you to keep your Slack message notifications private.