Well, it's telling you that the object you're calling a property getter or method on doesn't exist, or in javascript terms, undefined.
So, work backwards from the point of the error. Why does button_dec not refer to an object? Probably because the call to parent.firstChildElement didn't return an element, but instead couldn't find a child element. Why did that happen? Probably because your call to getElementsByClassName didn't return anything, or didn't return the element you think it did.
You'll have to insert console.log statements after each step in the code to see what it returned, like this:
const parent = document.getElementsByClassName("button-container");
console.log(parent);
const button_dec = parent.firstChildElement;
console.log(button_dec);
const button_reset = button_dec.nextSibling;
console.log(button_reset);
const button_inc = button_reset.lastChildElement;
So why did firstChildElement return undefined? Google for "javascript firstChildElement" and you'll find something interesting. Look very closely at the name of the function you're calling.