Automatic Form HTML showing up at bottom of page only

Your software
My Mautic version is: 4.4.10

Your problem
My problem is:

I’m trying to include a form in my webpage (next.js/vercel) like this:

<Script type="text/javascript" src="https://xxx/form/generate.js?id=2" id="mau"></Script>

But the form is only showing up at the bottom of the page and not where I insert the “Script”. How can I control where the form is placed?

These errors are showing in the log:
n/a

Steps I have tried to fix the problem:
n/a

I am trying this code:

<div>
          <h1>here</h1>
          <Script type="text/javascript" src="https://xxx/form/generate.js?id=2" id="mau" />
          <h1>there</h1>
        </div>

and instead of showing between “here” and “there” it shows at the bottom of the page.