How to create content / entity via ajax on a view?
The most basic version would be to add 'use-ajax' to the &quot;Add new&quot; button link pointing at a controller which returns an ajax command replacing the div. See https://www.drupal.org/docs/drupal-apis/ajax-api/basic-concepts#s-trigger-ajax-request-with-a-link.
Modals use also the 'use-ajax' class but need additional 'data-dialog-*' attributes. Then you can load normal HTML content in a dialog box, you don't need an Ajax controller in this case. See https://www.drupal.org/docs/drupal-apis/ajax-api/ajax-dialog-boxes
In a submit handler of the form you have to make a redirect to a URL you have setup to display the updated view together with the form.