hook_ENTITY_TYPE_insert never gets called Can anyone help me on the below functions. I am trying to alter user registration form and add my user form fields to default registration form. I am successfully retrieving data till validation, but I am not sure where I am going wrong in hook_user_insert. I am not able to retrieve the field value of my custom fields in hook_user_insert function.

Early support will be helpful in completion of the module.

function security_questions_form_user_register_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {
  // Hide the questions form when the user is being registered by an admin.
  if (!\Drupal::currentUser()-&gt;hasPermission('administer users')) {
    // Merge in our user form.
    $form += SecurityQuestionsUserForm::buildForm($form, $form_state);
    array_unshift($form['#validate'], 'security_questions_form_user_register_form_validate');
    // We can't add our submit handler here, because the user account doesn't
    // exist yet. Instead, we will get the info during hook_user_insert().
  }
}

/**
 * Validation handler for security_questions_form_user_register_form_alter().
 */
function security_questions_form_user_register_form_validate(array &amp;$form, FormStateInterface $form_state) {
  //module_load_include('inc', 'security_questions', 'security_questions.pages');
  SecurityQuestionsUserForm::validateForm($form, $form_state);
}

/**
 * Implements hook_ENTITY_TYPE_insert().
 */
function security_questions_user_insert(\Drupal\user\UserInterface $account) {
  // During registration, save the user's answers.
  print_r($account-&gt;questions);
  die;
  if (!empty($account-&gt;questions)) {
    security_questions_user_answers_save($account, $account-&gt;questions);
  }
}
You probably need to add a field to the user entity, which matches your form field key. Or, save the data in the session ..