In iOS, the display automatically rotates when you physically turn the device from portrait to landscape or vice versa.
Usually, this is a welcome feature – but sometimes you don’t want the device to rotate by itself. Luckily, you can lock the display to the portrait orientation to stop the automatic rotation. That way, the screen won’t accidentally rotate when placed on a table or when you’re lying down.
To do this, open Control Center and look for the padlock icon. Tap this to toggle the Portrait Orientation Lock on or off. When it’s on, the display will remain in portrait mode no matter how you’re holding it.
Bear in mind that some apps are designed only for landscape mode, and these will override the lock. Playing full-screen video will also override the lock and switch to landscape mode.