Introduction
Open System Preferences. Click Notifications & Focus. Then, click the desired application and uncheck the box next to "Show notifications on lock screen".
Instructions
2) Click the Notifications & Focus icon.
3) In the left-hand pane, choose the app for which you wish to hide notifications on the lock screen. Then, in the right-hand pane, uncheck the option labeled "Show notifications on lock screen."
NOTE: This setting is configured on a per-app basis. Click each app in the list on the left to configure its specific settings.
Outcome
Notifications will not be displayed on the lock screen for the app you selected.