document.getElementById is not a function [closed]

I was watching a name input tutorial from Bro Code. However when I did the same as him, the browser says “document.getElementById is not a function”

I want a button that changes the label to certain text.

document.getElementsById("button").onclick = function buttonFunc() {
  username = document.getElementsById("sup").value;
  console.log(username);
  document.getElementsById("label").innerHTML = "Hello" + username;
}
```

<label id="label">Sup?</label>

<input type="text" id="sup">

<button type="button" id="button">Submit</button>