Create relationship between node and menu link I would like to create a node with a menu link programmatically.  When the operation is complete, I would like the user to see the relationship between the node and the menu link under "Menu Settings" of the node.

I am aware of this post:

Programmatically create a node with a menu link

This shows the mechanics of creating a node and creating a menu link.  It does not show how to build the relationship between the node and menu link so it is available in "Menu Settings" of the node for a user working with the Drupal GUI.  How can I build this relationship?
To create a menu link for a node programmatically and to see it in the node edit form you have to connect the link uri to the node entity:

$item = \Drupal\menu_link_content\Entity\MenuLinkContent::create([
  'link' =&gt; ['uri' =&gt; 'entity:node/' . $node-&gt;id()],
  'title' =&gt; 'Menu item for node ' . $node-&gt;id(),
  'menu_name' =&gt; 'main',
]);
$item-&gt;save();