There are options for this both system-wide and notification by notification. Touch ID iPhones default to showing all details (settings / notifications / show previews - it is set to "when unlocked" for Face ID iPhone and "Always" for Touch ID devices), but, once this option was offered, I always changed the default on my iPad and iPhone 6s to the same "when unlocked" so that details would only be sen if I rested my finger on the home button.
You can also set the default to always show previews but do something like set Messages to When unlocked in Settings / Notifications / Messages / Show Previews, if you decided you wanted to keep the details about your messages private to whoever picked up your phone but you didn't really care about privacy for other apps.