There are two ways to perform an ‘Undo’ on a Mac. The easier way is to use keyboard shortcut. But you can find a GUI ‘Undo’ button as well in most apps.
How to undo on Mac using Command.
Command + Z to undo on Mac
Command + Z can help you to Undo in Mac
Command+Shift+Z help you to Redo on Mac
Otherwise, You will need to use the GUI in specific Software on your computer.