When you turn your phone, it automatically switches from portrait to landscape mode, which is great for viewing photos and videos. But sometimes auto rotate can be a bother.
To lock into portrait mode:
Go to Settings > Display > When device is rotated.
If you don't see this option, go to Settings > Accessibility, then turn on Auto-rotate screen.
When you want to switch back to auto-rotate mode, touch Rotate the contents of the screen.