I'm having the same (or similar) problem. You should give details of your Mac (yr, make, OS) and steps you took to fix it.
I would like to detail out the steps I took to try to identify & rectify the issue.
- Try resetting your NVRAM: Shut down and while pressing and holding Command + Option + P + R keys restart the Mac. Your Mac will go off and you can release the keys once it does (once you hear the startup sound). This should reset the NVRAM
- Reset the SMC: Shutdown your Mac. Press & hold Power + Option + Control + Shift for about 20 seconds. This resets the SMC. Please note: this is applicable for Macs with non-removable batteries only.
I tried these but it seems like there is some hardware issue (I need to confirm this)
I have a mid 2010 13" MBP. All of a sudden a day back I noticed the screen started flickering and it's very difficult to make out stuff on the screen. I tried several things (after looking up on YouTube) but none worked (resetting SMC, NVRAM, reinstalling OS, restoring from Time Machine).
To give some details, the issue is across apps, screens although it's most observable on Firefox and even after turning its hardware acceleration off from its preferences, it's no better. On Safari, the display is still blotted but much better than Firefox and that's where I'm currently using the Mac.
I'm yet to plug onto another display (as I'd need an adapter for mini DP to HDMI) and I'd be updating once I do that.
I know this is an old machine and has probably run its time, but it still works great, especially I upgraded its battery & SSD about 2 months back (I already had upgraded the RAM to 8 GB & from HDD to SSD some 5 years back but SSD was only 130GB, and I added another SSD 250GB, 2 months back).
I'm not sure if I want to spend any more than $100 on this machine (since I already spent like $200 2 months back hoping this would give me runway till the next MBP launches in '21)
Update: I had learned to live with it & have been using the system for the last 3-4 days with the flickering/glitches (it's less on Safari, unusable on Firefox) and just now, all of a sudden, without me doing anything, it all became fine (didn't restart or anything, it just went from glitches to perfect)