The Nintendo Switch console's screen brightness changes suddenly
Is your hand or an object covering the console's brightness sensor?
The brightness sensor automatically adjusts the screen brightness depending on the light level of the surrounding area.
Hold HOME Button for one second or more to open Quick Settings and turn Automatic Brightness to "Off".
You can also do this from "Screen Brightness" in System Settings.