How can I get the parent node of a referenced node?
I think hostEntity was specific to FieldCollection in D7 and not to entity reference. Field Collection is tied to one specific host Entity. With entity reference there is no specific host entity, you can possibly reference one entity in multiple host entities.

You can use Entity Query to get all (host) nodes that reference a specific entity within a specific field.

In a very basic form this would return all "Project" nodes that reference a specific building by field building:

$query = \Drupal::entityQuery('node')
  -&gt;condition('field_building', $building_nid);
$nids = $query-&gt;execute();


$building_nid is the node id of the building. This will return "project" node ids in your case.