Google Assistant can work on the lock screen, and anyone can access your phone. That's why you should disable Google Assistant on the lock screen.
You can hide incoming messages on your Samsung Galaxy S10 by changing your Notifications preferences, or hide the Messages app with a third-party app.