Does your project do what you want?
If you want the LED to light when you push the button and stay lit until you press the button again, look into the state change detection example. It will show how to detect when the button becomes pressed (high to low transition) rather than when it is pressed (a low level). And you can ignore the low to high transition and/or high level.
// initialize the pushbutton pin as an input, enable internal pullup
pinMode(buttonPin, INPUT_PULLUP);
You can eliminate the pullup resistor on the switch by using the internal pullup.
const int buttonPin = 2;
You can use the byte data type there and save a byte of, limited, SRAM. Seems like a small thing, but as you go on with programming you will see the value.
const byte buttonPin = 2;