Looking to create a keyboard shortcut to open the Share menu
macOS doesn't need to open a menu to find a sub-menu item, so long as the menu item is unique.
From your example, you can't open Share itself, but you can directly key command for instance &quot;Messages&quot;
In System Prefs &gt; Keyboard &gt; Shortcuts &gt; App Shortcuts, select All Applications then click the + underneath, add the exact name of the menu item (this includes any ellipsis … if there is one, which is not the same as three full stops … ) then underneath, your trigger, which can be anything that doesn't conflict.
This requirement for a full exact name does mean you cannot use this method for any 'smart' menu item that changes its name depending on context.

If, on the rare occasion the same command appears in two places in any menu structure, then you can direct to the correct instance by using this syntax to follow the correct path Edit&gt;Share&gt;Messages but for normal use you don't need the path.