For example, if you have a laptop with a 360-degree hinge, rotation lock will be grayed out when it’s in normal laptop mode. If you have a convertible PC, this occurs when your device is in laptop mode. In some cases, the “Rotation Lock” quick action tile and the “Rotation Lock” toggle in the Settings app may appear grayed out. Toggle it to “Off” to disable Rotation lock and enable automatic screen rotation. Scroll down to find the “Rotation Lock” slider and set it to the “On” position. To do so, head to Settings > System > Display.
You can also toggle Rotation Lock from the Settings app. It’s also possible that in customizing the Action Center, you removed that tile and need to add it back.
If you don’t see this tile, your device probably doesn’t support automatic screen rotation.