getElementsByClassName() returns all elements with a given class. It returns a live HTMLCollection.
const items = document.getElementsByClassName("item");
console.log(items.length);
console.log(items[0]); // First element
"Live" means the collection updates automatically when the DOM changes.