Twig template for custom entity not working
You must render the correct view mode of the entity, like this:

$view_builder = \Drupal::entityTypeManager()-&gt;getViewBuilder('ENTITY_TYPE');
$entity_view = $view_builder-&gt;view($representative);

$build = [
  '#theme' =&gt; 'representatives',
  '#representative_entity' =&gt; $entity_view,
];