For some reason I got the following error :
Unhandled Runtime Error SyntaxError: Invalid or unexpected token
I had to change the code to :
<Script strategy="lazyOnload">{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','${process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS}');
`}
</Script>
to fix the error. I could have said that your code has an issue but then your video did not show any issues.