If your laptop's display has recently been updated by Windows Update, you should roll back the display driver. If not, try updating or uninstalling the display driver to fix the flickering or dimming issue. To do this, open the Device Manager by typing it in the search box on the taskbar and selecting it from the list of results. You can also press Ctrl+Win+Shift+B to restart the graphics driver and see if it helps.
If that doesn't work, visit the manufacturer's website and update the video and graphics drivers for your model. The inverter board is responsible for providing power to the laptop's backlight lamp, and it does this by converting alternating current into direct current. If the inverter board is short-circuited or fails, it can cause your laptop screen to flicker. Manufacturers usually recommend taking your laptop to a repair shop for repair, but if you're confident in your abilities, you can visit the manufacturer's website for detailed instructions on how to do it yourself.
Once you've determined if your laptop has a faulty inverter or backlight, or a loose cable, you can replace the part or repair the connection.