Programmatically render a custom form in a view template while passing view argument to form
Print form before the views:

function mymodule_preprocess_views_view(&amp;$variables) {
  $form = \Drupal::formBuilder()-&gt;getForm('\Drupal\mymodule\Form\DefaultForm');
  $variables['attachment_before'][] = $form;
}


===

Another way is to add your custom form and the views in own controller (and route), 

In views add filters and expose them, set exposed in block = yes (this will detach the form from the views), 

in exposed filters settings set the names as they are in your form - for each one, 

make your form to redirect on submit to the route passing the values as query params (?param_name=value&amp;param_name2=value2), for multiple select or checkboxes params are in format: param_name[6]=6&amp;param_name[17]=17

the rest will be done by views - it will get params automatically

Controller:

&lt;?php

namespace Drupal\mymodule\Controller;

use Drupal\Core\Controller\ControllerBase;
use Drupal\views\Views;

/**
 * Class DefaultController.
 */
class DefaultController extends ControllerBase {

  /**
   * Content.
   *
   * @return string
   *   Return Content string.
   */
  public function content() {

    $elements = [];

    $elements['form_search'] = \Drupal::formBuilder()-&gt;getForm('\Drupal\mymodule\Form\DefaultForm');
    $elements['form_search']['#weight'] = 0;

    $views_name = 'machine_views_name';
    $display_id = 'page_1';
    $view = Views::getView($views_name);
    $view-&gt;setDisplay($display_id);

    $elements['view'] = $view-&gt;render($display_id);
    $elements['view']['#weight'] = 1;

    return $elements;
  }

}


example module with controller, form and exported views "Content list": https://github.com/svetlio/mymodule