Hey there Alprn37,
Thanks for reaching out to the Apple Support Communities.
To get started, do you by chance have Auto-Brightness enabled on your iPhone that may be adjusting the brightness depending on your current lighting conditions? If unsure, check out the steps in the following resource that can help with checking these settings: Adjust the screen brightness and color on iPhone - Apple Support
Adjust the screen brightness automatically
iPhone adjusts the screen brightness for current light conditions using the built-in ambient light sensor.
1. Go to Settings
> Accessibility.
2. Tap Display & Text Size, then turn on Auto-Brightness.
If Auto-Brightness is enabled, try turning the setting off to see if the issue persists. If it does, and if you haven't already, we'd also recommend restarting your iPhone with the steps below: Restart your iPhone - Apple Support
How to restart your iPhone X, 11, 12, 13, or later
1. Press and hold either volume button and the side button until the power-off slider appears.
2. Drag the slider, then wait 30 seconds for your device to turn off. If your device is frozen or unresponsive, force restart your device.
3. To turn your device back on, press and hold the side button (on the right side of your iPhone) until you see the Apple logo.
While restarting may seem like a simple step, it can often help with resolving some unexpected issues like this.
Keep us updated on the results, and we'll continue from there.
Have a great day!