How to get hook_form_FORM_ID_alter field value in hook_ENTITY_TYPE_presave I am adding one field dynamically by using hook_form_FORM_ID_alter.

/**
 * Implement hook_form_FORM_ID_alter
 * @param $form
 * @param \Drupal\Core\Form\FormStateInterface $form_state
 * @param $form_id
 */
function hook_form_FORM_ID_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
    // Modification for the form with the given form ID goes here. For example, if
    // FORM_ID is "user_register_form" this code would run only on the user
    // registration form.

    $form['platforms'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; 'Add Platforms',
        '#required'=&gt;True,
    );
}


"platform" field is added dynamically here, now I want this field value in hook_ENTITY_TYPE_presave.

/**
 * Implement hook_ENTITY_TYPE_presave
 *
 * @param \Drupal\node\NodeInterface $node
 */
function hook_ENTITY_TYPE_presave(\Drupal\node\NodeInterface $node){
    if($node-&gt;bundle()=='platform'){
        $field_platforms = $node-&gt;get('platforms')-&gt;getValue();// Here how to get platform field value.
   }
}


I am not getting any idea how do this any help very appriciate.
The form field you've added is not a node field.

If you want the field to be accessible in the node, then add it to the content type. In this case you don't need a form alter hook, because the entity fields are added to the form automatically. You can create multiple form modes with and without the field and select them dynamically, for example with Form mode manager.

If you don't want the field to be stored in the node, but want to do something else with the user input, then add a custom submit handler in the form alter hook to process the field value.