The buttons have four pins.
Two pins are the switch. You can wire the switch between an input pin and ground.
But you must enable the internal pull up on the pin if you don't use an external pull up/down resistor.
pinMode(inputPin, INPUT_PULLUP);
The other two are the LED. You NEED a current limiting resistor in series with the LED.
Failing to do so could damage the pin and/or the LED.
The CL resistor can be between 220ohm and 1k.
=470ohm is better if you are using more than one LED/button.
Leo..