Before Hydration Strategy
This strategy will allow you to load the script on server side making use of the Script component or useScript hook
For example
function HomePage() {
return (
<>
<HomePageTemplate>
<Script
id="INSTAGRAM-BEFORE-HYDRATION"
strategy={ScriptStrategy.BEFORE_HYDRATION}
src='https://www.instagram.com/embed.js'
/>
</>
)
}