Every app has that one menu command you use all the time and that has no shortcut. Merge All Windows in Safari is a good example. macOS can add a shortcut to any menu item yourself, as long as you know its exact name, and it has been in Keyboard settings for ages.
Open System Settings, click Keyboard, then Keyboard Shortcuts, and choose App Shortcuts in the sidebar. Click Add, pick the app (or All Applications), type the menu title and press the key combination you want.
System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts > Add
Application: Safari
Menu title: Merge All Windows
Keyboard shortcut: press your keys, e.g. Control-Option-Command-M
That example gives Safari a shortcut for Window > Merge All Windows, which tidies a dozen loose windows into tabs. For a command inside a submenu, Apple says to write the path with -> between the levels, for example Format->Font->Ligatures->Use Default. My advice is to pick a combination with three modifiers, so it’s unlikely to be taken already.
There are a few catches. The menu title has to match exactly what’s in the menu, including punctuation such as an ellipsis, or the shortcut won’t work. If the combination already belongs to another command, it won’t work until you change one of them. It only works for menu commands, so you can’t use it to open an app. And Apple notes that some apps don’t accept custom shortcuts at all. To undo one, select it in the list and click the Remove button.
Further reading: Create keyboard shortcuts for apps on Mac