How do I get $form_state from hook_entity_update()?
$form_state is not available there.

You might want to consider using fields and widgets, then you get a lot for free.

If that's not an option then you can register a so called #entity_builder:

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

function menu_ui_form_node_type_form_builder($entity_type, NodeTypeInterface $type, &amp;$form, FormStateInterface $form_state) {
  $type-&gt;setThirdPartySetting('menu_ui', 'available_menus', array_values(array_filter($form_state-&gt;getValue('menu_options'))));
  $type-&gt;setThirdPartySetting('menu_ui', 'parent', $form_state-&gt;getValue('menu_parent'));
}


The example is for the node type config entity, but it should work pretty much the same way for a content entity. book_form_node_form_alter() is an example for nodes.