I have Samsung S22. if you search google play for autorotate you will find 50+ apps for this, I am using one called "rotation control" but there are literally 6 of them all named "rotation control"
It used to be in the pull down settings you could turn autorotate on, or autorotate off. With autorotate off the phone would remain in either portrait or landscape mode, whatever mode you were in at the time you disabled autorotate.
They changed it recently to autorotate mode, or Portrait mode. It is no longer autorotate on or off. Instead, every single individual app gets to decide if it respects the phone's setting of autorotate being on, or locked into portrait. Some apps not only do not respect your setting, they also do not have any functionality anywhere in the app to change this setting. Namely, gallery, and camera app (the default apps for taking pictures and viewing said pictures).
This is most notable when taking pictures of something on the ground, or like if you were some instagrammer who loved to take pictures of their food, but really any picture taking from an aerial vantage point with the phone being completely flat.
It impacts me the most when using my phone to take pictures in some weird nook and cranny, trying to see behind shit like if you are working on your car or whatever and you use your phone to take a picture. Now i've taken the picture in some weird angle so it doesn't really matter to me whether it is portrait or landscape. The issue is when I go to view the picture, I will have to turn the phone one way or another to read it and because camera/gallery does not respect the "Autorotate OFF" functionality and stay locked in "portrait" ie stay locked in the orientation that the picture was taken it, then it fucking constantly swaps the orientation and minimizes the picture when i'm just trying to read a part number or get a serial number or something off of whatever I just took a picture of.
The app I use overrides every single app's preferences and keeps the phone locked into portrait mode (amongst half a dozen other options), which is what the setting used to do before they broke it. So now when I need to take (or view) a picture instead of turning on portrait mode in settings, i have to turn on portrait mode in this always on app that sits in my notification window. I also lock it into landscape mode if i'm watching videos or something, usually if i'm leaning back in a chair or laying in bed and the phone gets confused and wants to fucking autorotate into portrait mode like an asshole because my hand moved slightly.
edit: i'm guessing a lot of you guys don't realize that they broke this functionality. I was talking to my buddy who asked the same questions as you guys, and then once I explained what was happening to him he said "oh. hrm. my phone is doing that to. isn't it supposed to?" No. when you disable autorotate, the phone should never, ever autorotate for any reason. no matter what app is being used. That's what disable means. Because it's the camera app he just thought that it was normal behavior.