If you don't want certain messages popping up on your iPhone's screen, you can hide them through filtering or disabling their alerts or notifications.
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.