However, in Photoshop this operation is somewhat different when you can only undo once. Traditionally, the Undo is done by pressing Ctrl + Z, and the more you press, the more your script will be returned to its original state.
Undo (undo) is a necessary operation for any office software so you can easily correct errors on your draft work.