Dear Samsung Member,
Greetings from Samsung Customer Support!
Follow the bellow mentioned steps yo resolve your issue:-
1). If this happen when you are using a particular app?
Note: Ensure that you only download apps from reliable and safe sources such as galaxy apps or the google play store.
2). If you are having trouble with a particular app, you can put your device into Safe mode to verify the issue.
To check device in safe mode: Power off the device > Press and hold the Power key for one or two seconds to turn on the device > When the Samsung logo appears, press and hold the Volume down key.
To exit safe mode: Restart your device.
If issue still persist or for further assistance, kindly register your concern in Samsung members app (Samsung Member > Get help > send feedback > Ask question/Error report)
Thank you for writing to Samsung.
Samsung Customer Support