You can turn on “Hide Alerts” in iOS and iPadOS if you wish. Here’s how:
- Open Messages.
- Swipe left over the conversation that you want to mute.
- Tap the Alerts button (a bell icon with a line through it).
When Hide Alerts is on, the Alerts button appears next to the conversation. This stops notifications only for that conversation, not your device. You’ll still receive all other messages and see notifications for them on your Lock Screen.
(This how-to is based on my experiences and info on Apple’s support pages — where the images sometimes come from.)