Simple JavaScript on click event is not working [closed]

There is a CSS file and js file that was copied for a custom particle engine background. I can post them if this file isn’t the problem but they are extremely complex. There is another CSS file to style the html code below

The code is below.

function handleClick() {
  alert("Button clicked!");
}
<!-- File-->
<!DOCTYPE html>
<html lang="en-US">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>homePage</title>

  <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">


  <script src="../static/background.js" defer></script>
  <script src="https://code.createjs.com/1.0.0/easeljs.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.1/gsap.min.js"></script>

  <link rel="stylesheet" href="../static/background1.css">
  <link rel="stylesheet" href="../static/signInPage.css">
</head>

<body>

  <!-- Heading's Color ans size -->
  <h1>

    <span class="welcome">Hello &amp; Welcome To:</span>
    <span class="redRat"> THE RED RAT'S ACRCHIVES </span>

  </h1>


  <!-- Paragraph text -->
  <p class="welcomeMessage"> This is a collection containing the most popular browser games from all over the internet with games that are old and new. <br> I hope you will enjoy and share with your friends.<br> </p>
  <br>
  <p class="createAccountMessage"> Please sign in or create an account to access the website</p>

  <!-- Log In Buttons-->
  <div class="createAccountButton">
    <button onclick="handleClick()" id="createAccount" type="button" class="btn btn-outline-light">Create Account</button>
  </div>

  <div class="signInButton">
    <button type="button" class="btn btn-outline-light">Sign In</button>
  </div>

  <!-- Paragraph text -->
  <p class="contactInfo"> email me at [email protected] with any feedback, recommendations, or errors you encounter </p>

  <canvas id="projector" width="800" height="600"></canvas>


</body>

</html>

I have tried using event listeners and putting the js code in other files. I tried debugging and checking for errors as well as other basic js functions. I have no idea. I was expecting a basic js alert when the createAccount button is clicked. The alert function was created to make sure Js code generally works in my program.