Keyboard shortcuts don't stop at Command-Z, Command-C, and Command-V. Here's how to create your own keyboard shortcuts in every version of macOS.
Almost all applications provide their own keyboard shortcuts for doing common tasks. If you've used any of these handy key combos, you'll know they save you stacks of time in aggregate, since you don't waste that time navigating graphical menus whenever you need to undo a formatting mistake in Pages.
However, sometimes there are tasks which you repeat often, but which aren't covered by the app's default combinations. Thankfully, there's a way to create your own keyboard shortcuts so you can really turbocharge your workflow.
Before you start
As with any computing task - or any other work, for that matter - check whether the wheel exists before you reinvent it. Take a look at the list of macOS pre-defined shortcuts, as well as the particular app's shortcut list, to ensure the shortcut you want isn't already there. Also, some applications offer the ability to create your own shortcuts within the app itself, such as those in the Adobe CC suite, but this usually isn't the case.
You can only use keyboard shortcuts to perform a command that already exists within the app's menus. You can't create one for doing anything else within the operating system, such as opening an app. For these tasks, you'll need a different tool - Apple Shorcuts.
Finally, take care to avoid using a key combination which has already been used. You really don't want your shortcut to conflict with one which might quit the app without saving.
How to create a keyboard shortcut
In the top left, click the Apple logo, then in macOS Monterey or earlier, click on System Preferences. With macOS Ventura, it's System Settings in the same place. Next, click on Keyboard, then the Shortcuts tab in Monterey, or Keyboard Shortcuts button in Ventura.
Now select App Shortcuts in the left panel.
In the right panel, there'll be a list of all the app-specific keyboard shortcuts that have already been defined, with checkmarks on the left of each denoting whether it's active. If no shortcuts have been added before, this list will probably just contain one called "Show Help menu". Each shortcut shows the menu path and command in the center, with the key combination shown on the right.
To add a new shortcut, click the plus button (+) beneath the list on the right panel to open a new window. You'll need to select the application to which the shortcut applies. If multiple apps happen to have matching menu paths to the same command, you can select All Applications, but usually your shortcut will be limited to a single app.
In Menu Title, input the menu path to the command, followed by the command itself. If the command is unique, you can just enter it without its path. Each level needs to be separated by "->". For example, to export your Pages document in a Microsoft Word format, the Menu Title would be "File->Export To->Word...".
Keyboard Shortcut is the key combination you want to use to execute the command. Click inside the text entry box and hold down the relevant keys simultaneously. The entry box will display the combination of keys. If you make a mistake, or want to use a different combo, just press the correct keys and the box will reflect the change.
Once you're done, click the Add button, and your shortcut will be added to the list in the right panel, under the application name. It's a good idea to test the shortcut to make sure it works before you close the keyboard shortcuts window.
How to modify or remove a keyboard shortcut
If you'd like to change the key combination of a shortcut, its command, or remove it entirely, then head back to the Apple logo -> System Preferences -> Keyboard -> Shortcuts tab -> App Shortcuts.
Locate the shortcut in the list, then click either the Menu Title or key combination to change them. When you're done, click off to an empty space in the window to confirm the modification. Again, test the shortcut before you close this window.
To remove a keyboard shortcut, select it in the list, then click the minus button (-) below the panel. The shortcut will disappear from the list.
If it seems fiddly to set up your first keyboard shortcut, after you've then used that shortcut in action you will be back to make more. Don't make too many at once, though, as you'll lose track of what you've already set up.