Strange temporary recurring flashes on the screen
First, Make sure your MacOS is up to date in [System Pref -&gt; Software Update].
Try disabling the auto brightness in [System Pref -&gt; Display] (automatically adjust brightness); and [System Pref -&gt; Keyboard] (adjust keyboard in low light).
If you have a custom color profile, switch to the default &quot;color LCD&quot; one in [System Pref -&gt; Display -&gt; Color]. https://www.youtube.com/watch?v=MsK5zmRpg5k
Resetting PRAM might also help: Reboot, hold CMD + Opt + P + R until the apple logo shows, then let go. https://support.apple.com/en-us/HT204063
https://www.youtube.com/watch?v=N5laIcLMnJU
Create a guest account or new user in [System Pref -&gt; Users &amp; Groups] use the + icon to create one. Press the Apple logo at the top left to [log out] and test using the new account.
You can also try running the Apple Diagnostics test to see if there's a hardware problem by restarting and holding &quot;D&quot; until it boots up.
https://support.apple.com/guide/mac-help/diagnose-problems-mh35727/mac
https://www.youtube.com/watch?v=H8y_pcaw_Ac
For hardware-related repairs: If you have AppleCare+, it wouldn't hurt to get a price quote, because 2016+ MacBooks have a T2 chip that rejects non-Apple certified hardware repairs and parts. If looks like the minimum cost for a repair for the screen could be $99-$300. https://support.apple.com/mac/repair/service
This site says to expect around $455+ for an out of warranty screen repair.
https://www.gophermods.com/how-much-does-it-cost-to-replace-a-macbook-screen-at-the-apple-store/
Hope this helps! Best of luck!