Chosen Solution
I ordered a replacement screen for my phone from Ifixit and installed it myself, the replacement came with the camera and all the upper components all preinstalled, all I did was move over the home button, but now my screen does not adjust brightness automatically! What’s wrong?
Check the connectors. If that doesn’t work, the Ambient light sensor could be damaged, try replacing the sensors that came with the screen with the original sensors from your previous screen. Or if none of these methods work, it could be the software making it not work. As Apple is against user repair, they could be blocking this feature. Hope I’d help!