How to disable views pager programatically in certain cases
Piggybacking off How to set views pager item size programmatically? and looking at PagerPluginBase.

To change values

if ($disable_pager == FALSE) {
  $view-&gt;setOffset(0);
  $view-&gt;setItemsPerPage($items_per_page);
}




Now to answer your question 


  How can the pager be disabled in above code?


You can disable it by setting items per page to zero.

$view-&gt;setItemsPerPage(0);


If you want to limit the amount of items without pager, all you have to do is unset it. 

   $view = Views::getView('content_list');
   $display_id = 'embed_content_list';
   $view-&gt;setDisplay($display_id);
   $view-&gt;setItemsPerPage(12);
   $view-&gt;execute();
   unset($view-&gt;pager); // must put this unset after the $view-&gt;execute();
   $variables['content']['content_list'] = $view-&gt;buildRenderable($display_id, [$filter_args]);