Settings, Notifications, Show Previews, and set it to Always (or When Unlocked). If it is off for one app, open Settings, Notifications, that app, and check Show Previews there too. A Focus mode can also hide previews, so check Settings, Focus, that your active one is not set to hide notifications. Face ID 'when unlocked' is the usual reason previews only show after you look at the phone.
Settings > Notifications > Show Previews, set it to Always (or When Unlocked if you want them hidden until you pick the phone up). It probably got flipped to Never.
Also check the Messages app specifically under Notifications, and make sure Lock Screen is ticked as an alert style. Previews off plus lock screen unticked gives you exactly this.
Settings, Notifications, Show Previews, set it to Always or When Unlocked. It probably got flipped to Never. Check the Messages app specifically has Lock Screen ticked too.