Pager with EntityQuery
Add the pager to the build array in which you return the results:

  return [
    'results' =&gt; [
      '#theme' =&gt; 'mytheme_news_archive',
      '#items' =&gt; $nodes,
      '#path'  =&gt; $path,
    ],
    'pager' =&gt; [
      '#type' =&gt; 'pager',
    ],
  ];    


Or extend the theme with a variable #pager if you want to theme this in one place:

  return [
    'results' =&gt; [
      '#theme' =&gt; 'mytheme_news_archive',
      '#items' =&gt; $nodes,
      '#path'  =&gt; $path,
      '#pager' =&gt; [
        '#type' =&gt; 'pager',
      ],
    ],
  ];    


Then you can print the pager in twig:

{{ pager }}