Store entity with entity reference field?
You should try this for entity reference fields:
Single value:

$entity_data = [
'field_student_account' =&gt; ['target_id' =&gt; 10],
];


Multiple values:

$entity_data = [
'field_student_account' =&gt; [
    ['target_id' =&gt; 10],
    ['target_id' =&gt; 11],
  ],
];


Hope that works :)