javascript create script tag

JavaScript
var script = document.createElement("script");
script.src = "https://url.com/";
document.head.appendChild(script);
Source

Also in JavaScript: