Get form values into hook_node_insert / hook_node_update
Use an entity builder callback on the form, for example:

function menu_ui_form_node_form_alter(&amp;$form, FormStateInterface $form_state) {
  // ...
  $form['#entity_builders'][] = 'menu_ui_node_builder';
}

/**
 * Entity form builder to add the menu information to the node.
 */
function menu_ui_node_builder($entity_type, NodeInterface $entity, &amp;$form, FormStateInterface $form_state) {
  $entity-&gt;menu = $form_state-&gt;getValue('menu');
}