iPhone X screen rotation
Lock is off, restarted, not working. New phone
iPhone X
Lock is off, restarted, not working. New phone
iPhone X
Using every apps? or does it happen only with some apps?
Try also a "forced" restart of your iphone X
Press and quickly release the Volume Up button. Press and quickly release the Volume Down button. Then press and hold the Side button until you see the Apple logo. When it appears, release the Side button, wait for your iPX to restart, then test it.
If you get no help, since your iPhone is brand new, have it inspected at your most concenient Apple Store or Authorized Service Provider: https://locate.apple.com/findlocations
Regards
Giulio
iPhone X screen rotation