Starting at the most basic steps, it’s important to verify that auto-rotate is activated when you’re trying to get your screen to rotate. You can activate auto-rotate by dragging the status bar down to open the quick settings in your notification shade on every Android phone.
From there, tap the auto-rotate toggle to active it, and try to rotate your screen again. Some accelerometers can be more or less sensitive, so you might also want to try rotate your phone with slightly more vigor to trigger the auto-rotate feature more deliberately. If auto-rotate is enabled, and you’re violently shaking your phone to get it to rotate to no avail, there might be another issue at play.
One possibility is that your screen could be picking up touch inputs, which prevent the display from rotating. Make sure you’re not touching the display itself when you’re rotating the device. If you’re sure you’re not touching the display, and auto-rotate is enabled, there may be something else going on.
SlashGear
https://www.slashgear.com/1229957/why-your-android-phone-screen-wont-rotate-and-how-to-fix-it/