iPhone screen not rotating
I am using iOS 18.3.2 on an iPhone XSMax. I think it's been happening for a while now, possibly from 18.0, but my iPhone screen doesn't rotate (the accelerometer doesn't work) in Safari, Photos, etc. I have read that calibrating the compass can sometimes resolve the issue but I can't find any option to calibrate the compass in the Compass app or Settings menu. The phone is in a hard case & screen protector and has been dropped on the floor a few times over the years but everything else seems to be working fine. Any help would be much appreciated. Many thanks.
iPhone XS Max, iOS 18