import here map API Like this:
<Script src={`https://js.api.here.com/v3/3.1/mapsjs.bundle.js?apikey=${process.env.NEXT_PUBLIC_HERE_API_KEY}`} strategy="afterInteractive" type="module" />