Sometimes to get the views exposed form and place into somewhere in the site. So we can use the below code to achieve programmatically.
$view = Views::getView('view_name');
$view->setDisplay('display_name');
$view->initHandlers();
$form_state = (new FormState())
->setStorage([
'view' => $view,
'display' => &$view->display_handler->display,
'rerender' => TRUE,
])
->setMethod('get')
->setAlwaysProcess()
->disableRedirect();
$form_state->set('rerender', NULL);
$form = \Drupal::formBuilder()->buildForm('\Drupal\views\Form\ViewsExposedForm', $form_state);