How

  1. Press Command-Z in the app where you made the edit. Availability depends on the app and action.

Official documentation · Apple Support

Why it works

Learn how to undo the last edit on your Mac.

Included in Keyboard: everyday flow

Sources
Open full demonstration ↗