As a process of elimination can you put the phone in Safe Mode which disables your downloaded apps and leaves the stock ones working and then see what happens.
If the issue stops it could be one or more of your downloaded apps. Come out of Safe Mode and start deleting your most recent apps one at a time until it stops.
If it continues in Safe Mode then what I'd suggest to do in order is....
Turn the phone Off and then from a set series of button presses go into the phones system files cache and clear those. No info is lost.
Back up , remove any Sd card and factory reset.
then a Samsung Experience Store or Samsung Service Centre can help.
Daily Driver > Samsung Galaxy s²³ Ultra 512Gb in Phantom Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help. " This is the way. "