Hi @iwanttobeDev
AEM doesnot have control over third party script. If we are injecting third party script make sure we follow best practices such as minification of script, removing the blocking resources, defer loading, optimisation etc.
Lighthouse plugin in chrome developer tool is one of the good plugin which reports about improvements and solution to increase the performance of site.
You can follow the best practices document along plugin as well.