I have created a custom block using Entity Query with pagination to get the data and everything works fine with
$render[] = [
'#type' => 'pager',
];
But I can find a way to change the position of the pager. For example, I want to include them in my custom block template. I can't do that.
For Drupal 7 we have the following option but I can find the same way to do that in Drupal 8
theme('pager')
Thanks for your help