How can I use javascript to create a button that will show an alert when clicked? [duplicate]

Apologies if some of my wording is poor as this is my first post here. I’m trying to create buttons that give an alert when clicked, using Javascript. I’m also trying to avoid using inline JS in the HTMl document. Below is how my code looks, which is giving me an Uncaught TypeError: userSelection.addEventListener is not a function.

const userSelection = document.querySelectorAll('button');
userSelection.addEventListener('click', () => {
   alert('You clicked a button!');
}

Here is what the section of my HTML I’m trying to target looks like:

<button class='rock">Rock!</button>
<button class="paper">Paper!</button>
<button class="scissor">Scissors!</button>