Turn off the phone

Welcome
How do I stop the horizontal and vertical movement of the phone and install it vertically only?
What is the sensor to be used and how to stop it

In Screen1, set Screen Orientation to Portrait.