Routing custom module with alphabetic pagination
As I alluded to in my comment, you are close, I believe. Here are some changes to get you in the right direction which begins by extending ControllerBase:

class ZiektesController extends ControllerBase
{

  // set any scope/variables here

  public function __construct($args...) {
    // set your injected dependencies to local variables
  }

  public static function create($args...) {
    // here you inject dependencies you need
  }

  public function ziekte($letter) {    
    return array(
     '#theme' =&gt; 'mytheme_ziektes',
     '#items' =&gt; $this-&gt;queryNodes($letter),
     '#path'  =&gt; $path,
     '#url'   =&gt; $current_path,
    );
  }

  protected function queryNodes($letter) {
    // the following code can be refactored
    $letter_path = 'B';
    $path = base_path();
    $current_url = Url::fromRoute('&lt;current&gt;');
    $current_path = $current_url-&gt;toString();

    // Query for newest articles and return max 3 results.
    $query = \Drupal::entityQuery('node');
    $nodes = $query-&gt;condition('type', 'ziekte')
      -&gt;condition('status', 1)
      -&gt;condition('title', $letter_path, 'STARTS_WITH' )
      -&gt;sort('created', 'ASC')
      -&gt;execute();

    return count($nodes) ? $this-&gt;entityTypeManager-&gt;getStorage('node')-&gt;loadMultiple($nids) : array();
  }
}


ControllerBase should inject everything you need already, like entityTypeManager. That can be used to load nodes, as shown above. You don't need to call Node, and you likely don't have to do the same for Url either.

You can bring in your query as a helper method and you can inject entityQuery into your controller, see this comment on how to do that. That way, you're not using the global static container (\Drupal::). Then your code becomes:

    // Query for newest articles and return max 3 results.
    $query = $this-&gt;entityQuery-&gt;get('node');
    $nodes = $query-&gt;condition('type', 'ziekte')
      -&gt;condition('status', 1)
      -&gt;condition('title', $letter_path, 'STARTS_WITH' )
      -&gt;sort('created', 'ASC')
      -&gt;execute();


I am not sure why you need path and url though - every filter link will be routed to '/ziektes/{letter}'.