How to set default value for entity reference field in hook_form_alter following snippet doesn't   set the default value.

 $form['field_image']['#default_value']='default';


I Have content type called image and I'm trying to set the default value for a reference to it in another content type.  The above code doesn't work.  Printing out the form variable doesn't make it seem like an easy task.
You need to first check the structure of your form. Mine worked with the following:

$form['field_image']['widget'][0]['target_id']['#default_value'] = \Drupal\node\Entity\Node::load(2);


Cheers!