Populating Select2 with AJAX
The ajax callback is pointing to the wrong function, should be:
callback' =&gt; 'reloadOptions',

It's better to make it return just the field rather than the entire form
$form['field_author']['#prefix'] = '&lt;div id=&quot;author-ajax-wrapper&quot;&gt;';
$form['field_author']['#suffix'] = '&lt;/div&gt;';

$form['field_author']['widget']['#ajax'] = [
  'callback' =&gt; 'reloadOptions',
  'wrapper' =&gt; 'author-ajax-wrapper',
  'event' =&gt; 'select2:opening',
];

Adjust the reloadOptions fuction, so it returns just the specific field
return $form['field_author'];