next/head | Next.js
We expose a built-in component for appending elements to the head of the page: To avoid duplicate tags in your head you can use the key property, which will make sure the tag is only rendered once, as in the following example: In this case only the second is rendered.
https://nextjs.org/docs/api-reference/next/head