How to pass query parameter in form submit?
Stick with your original route definition:

mymodule.word:
  path: '/mypage'
  defaults:
    _controller: '\Drupal\mymodule\Controller\AdminController::myfunction'


Then set your submit handler to this:

function submitForm(array &amp;$form, FormStateInterface $form_state) {

  $data = $form_state-&gt;getValue('edit');
  $url = Url::fromRoute('mymodule.word', [], ['query' =&gt; ['word' =&gt; $data]]);
  $form_state-&gt;setRedirectUrl($url);
}