How to embed a node's NID in the title of a node?
You need to do two step:

Step one: auto generate the title and hidden form. use hook_field_widget_form_alter() with code

function MY_MODULE_field_widget_form_alter(&amp;$element, \Drupal\Core\Form\FormStateInterface $form_state, $context) {
  $field_definition = $context['items']-&gt;getFieldDefinition();
  $bundle = $form_state-&gt;getFormObject()-&gt;getEntity()-&gt;bundle();
  // You can check with other bundle
  if ($field_definition-&gt;getName() == 'title' &amp;&amp; $bundle == 'page' &amp;&amp; $element['value']['#default_value'] == '') {
    $element['#required'] = FALSE;
    //hidden title  
    $element['#type'] = 'hidden';
    $element['value']['#required'] = FALSE;
    // Set default value
    $element['value']['#default_value'] = 'Default Title';
  }
}


with step one you can cross submit form.

Step two: Override new title with default value. Use hook_node_insert()

function MY_MODULE_node_insert(Drupal\node\NodeInterface $node) {
  if ($node-&gt;bundle() == 'page') {
    $new_title = 'New title ' . $node-&gt;id();
    $node-&gt;setTitle($new_title);
    $node-&gt;setNewRevision(FALSE);
    $node-&gt;save();  
  }
}