<style>
tags should be places within the <head>
element, and each added tag should be added to the bottom of the <head>
tag.
Using insertAdjacentHTML to inject a style tag into the document head tag:
document.head.insertAdjacentHTML("beforeend", `<style>body{background:red}</style>`)
_x000D_
$('<style>').text("body{background:red}").appendTo(document.head)
_x000D_
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
_x000D_