Search for “Reduce White Point” or “dim flashing lights” in Settings. This is an accessibility feature enabled by default by Apple to protect users’ health—not only vision, but also to reduce the risk of triggering seizures in individuals with epilepsy. After acknowledging the associated risks, you may manually disable it. Related issue: iPhone 14 Pro Max screen dims automatically – Apple Community
References
iPhone 14 Pro video playback brightness fluctuates – Apple Community