How to insert value to user entity custom field while creating new account?
The hook_ENTITY_TYPE_insert in case of entity user expecting Drupal\user\UserInterface instance not Drupal\Core\Entity\EntityTypeInterface

change your hook to:

/**
 * Implements hook_ENTITY_TYPE_insert().
 */
function MYMODULE_user_insert(Drupal\user\UserInterface $user) {
  $user-&gt;set('field_custom_referral', '3');
  $user-&gt;save();
}