My screen doesn't work unless I use the s pen on it
May I ask has anything happened that could have caused this to happen.
Have you applied a new screen protector.
If your using a Sd card then remove it as a glitching card can cause all sorts of problems.
Has the phone had an accidental bump or had water damage. There might be a water sensor just inside the sim card tray. Check if it's still white.
Downloaded a recent app that could be affecting the phone.
Maybe use Safe Mode To see if it's an app.
Put the phone in Safe Mode which disables your downloaded app's but let's your stock app's keep working. If the issues stop then this highlights a downloaded app as the possible issue. Come out of Safe Mode and start deleting your most recent downloaded app's one at a time until it stops. https://www.samsung.com/uk/support/mobile-devices/how-to-start-my-galaxy-device-in-safe-mode/
The phone has built in diagnostic tools.
Open your phone app and dial *#0*# which will bring up a number of tests.
Look in your Samsung Members App for the diagnostic tools.
A Samsung Experience Store or Samsung Service Centre can take a look.
I wish you all the best with this.
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. "