How to set default form fields value from controller
Add the default values to getForm():

return $this-&gt;formBuilder()-&gt;getForm('Drupal\mymodule\Form\MyForm', $default1, $default2);


And set the default values in the form class:

class MyForm extends FormBase {

  public function buildForm(array $form, FormStateInterface $form_state, $default1 = NULL, $default2 = NULL) {

    $form['field1'] = [
      '#type' =&gt; 'textfield',
      '#title' =&gt; $this-&gt;t('Field 1'),
      '#default_value' =&gt; $default1,
    ];

    // ...

  }
}