Automatically add node to menu How can I automatically create a menu link for a new node in Drupal 8?
You can use a deriver class for this.

In your foo.links.menu.yml file

entity.node.canonical:
  deriver: '\Drupal\foo\Plugin\Deriver\FooMenuLinkDeriver'
  route_name: entity.node.canonical


In Drupal\foo\Plugin\Deriver\FooMenuLinkDeriver

class FooMenuLinkDeriver extends DeriverBase implements ContainerDeriverInterface {
  public function getDerivativeDefinitions($base) {
    $plugin_definitions = [];
    foreach (Node::loadMultiple() as $nid =&gt; $node) {
      $plugin_definitions[$nid] = $base;
      $plugin_definitions[$nid]['route_parameters']['node'] = $nid;
      $plugin_definitions[$nid]['title'] = $node-&gt;label();
    }
    return $plugin_definitions; 
  }