That looks like a bad graphics card.
Does it happen with anything outside of Adobe products that use the GPU?
First, try disabling GPU in the preferences (Performance tab). Any better?
Go to Preferences > Technology Previews... and enable "Older GPU mode (pre 2016)" - Restart Photoshop. Better?
If not, go to Preferences > Technology Previews... and check "Disable Native Canvas" - then restart Photoshop. Better?
If not, recalibrate and build a new ICC display profile; the old one might be corrupted.
If you are using software/hardware for this task, be sure the software is set to build a matrix, not LUT profile, Version 2, not Version 4 profile.
If turning OFF the GPU works, it's a GPU bug, and you need to contact the manufacturer or find out if there's an updated driver for it. This is why disabling GPU is an option as more and more functionality moves to the GPU in newer versions of many Adobe products.
It got fixed by updating Photoshop version...
Are you certain? How did updating Photoshop fix Illustrator? Did you update your Mac OS?