If you save an image in Photoshop, flatten it and save it by accident, then you’ll notice that the regular undo command Ctrl + Z (Command + Z on the Mac) doesn’t have any effect.
Luckily there is a different solution to undo the mistake, which is to use Alt + Ctrl + Z (Option + Command + Z on the Mac) instead, also known as Step Backward.
Undo Save