None of the YouTube javascript is working in an html page, How Come?

So make an example that demonstrates your problem, that I can run…

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
      /* Minimal styling if absolutely necessary */
    </style>
  </head>
  <body>
    <-- Minimal HTML to reproduce error -->

    <-- Links to libraries on CDNs -->
    <script>
      // Minimal JS to reproduce error
    </script>
  </body>
</html>
´´´