I assume it's not had an accidental bump or water damage.
You could try a factory reset after backing up and removing any relevant sd card @Gazzairee
A Samsung Experience Store or Samsung Service Centre can take a look but there maybe a charge as the manufacturers warranty is for 2 years.
I agree with the others that the phone's battery may need attention.
Daily Driver > Samsung Galaxy s²² Ultra 256Gb 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. "