How to programmatically reference entities?
As pointed out by 4k4 in the comments, the most robust way is assign an entity object to the field like so:
$new_entity = \Drupal::entityTypeManager()-&gt;getStorage('node')-&gt;create([
  'type' =&gt; 'notification',
  'title' =&gt; $entity-&gt;label(),
  'field_content' =&gt; [
    'entity' =&gt; $entity,
  ],
]);

For posterity, you can also do it by setting the field column (target_id) directly, but this is only useful if you have a saved entity. The first example will work for both new and existing entities.
$new_entity = \Drupal::entityTypeManager()-&gt;getStorage('node')-&gt;create([
  'type' =&gt; 'notification',
  'title' =&gt; $entity-&gt;label(),
  'field_content' =&gt; [
    'target_id' =&gt; $entity-&gt;id(),
  ],
]);