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.
You can't leave a group text on your Android phone, but you can still mute or delete the thread in your Messages app.