I assume there is no debris in the ports etc ?
Perhaps go over to your dial pad and type in *#0*#, this will bring up a number of tests.
A Samsung Experience Store or Samsung Service Centre would be able to run a diagnostic test.
🌈 Stay Safe & Stay Alert. 🌈
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. "