The Orientation lock is a setting that prevents the screen display from rotating on default when the device is set to landscape mode.
To activate this setting:
Step One: Swipe up from the bottom of the display to open the control center. Follow this if your device is an iPhone 8 and older.
Swipe down from the top of the display to open the control center if your phone is iPhone X up to the latest build of iPhone.
Step Two: Find the orientation lock button.
Step Three: Tap the button to toggle the orientation lock ON or OFF.
When the orientation lock is ON the device will remain in portrait mode when rotated to landscape mode