Uncaught TypeError: popupOpenButton.addEventListener is not a function

HI!

the question is stated in the topic. Here is my script:

// popup

let popup = document.getElementsByClassName("popup");
let popupOpenButton = document.getElementsByClassName("profile__edit-button");
let popupCloseButton = document.getElementsByClassName(
  "edit-window__close-button"
);

popupOpenButton.addEventListener("click", function handleClick(event) {
  console.log("user clicked: ", event.target);
  // event.target.classList.add("popup_active");
});

popupCloseButton.addEventListener("click", function handleClick(event) {
  console.log("user clicked: ", event.target);
  // event.target.classList.remove("popup_active");
});

addEventListener is not a method on HTML collections, you need to use it on an html element