Don't leave your iPhone unlocked and unattended in public places like offices, schools, malls, etc.
Settings > Notifications > [Select an App] > Banner Style [Tick Temporary]
Temporary: The notification appears briefly at the top of the screen and then disappears automatically after a few seconds. It doesn't require user interaction.
Persistent: The notification stays at the top of the screen until the user manually dismisses it, either by swiping it away or interacting with it.

To turn off notifications selectively for apps, go to Settings > Notifications > Siri Suggestions, turn on Allow Notifications, then turn off any app.

Go to Settings > Notifications. · Tap an app below Notification Style, then turn on Allow Notifications. · Tap Sounds, select a sound, then tap the Back button at ...
Change notification settings on iPhone