This article describes three calibrations that can improve the performance of devices running iOS 11 or later.
If the iPhone’s Auto-Brightness sensor isn’t working properly, the phone won’t respond properly to changes in lighting. The problem may arise because Auto-Brightness adjusts itself partially based on where the value was set when the feature was enabled.
Here's how to recalibrate the Auto-Brightness sensor:
Open the Settings app, scroll down and select Accessibility.