The new Script Component - recommended reading
Written in 2022, 4 years ago. Tools and advice may have moved on since.
There is a new solutions to Third-party scripts with Gatsby: the Script Component.
Get the low down from Ty Hopp, Senior Software Engineer at Gatsby.
All the best,
Queen Raae