Using two buttons to increase and decrease number

Hello folks,

I'm currently trying to make a simple project when you press first button, a number decreases, and using second button to increase a number (later will be developed into something much more complicated...). Anyways my trouble is that when I use my first button (without the second button used in the code) the number shown on my LCD does it's job, a press adds 1 to the number, but when I write the code for the second button, the number decreases automatically every second no matter if I press the second button or not... What am I doing wrong? p.s I'm still a beginner at programming and Arduino

// constants won't change. They're used here to set pin numbers:
const int buttonPin = 2;  // the number of the pushbutton pin
const int buttonPin2 = 3;
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); 
// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
  pinMode(buttonPin, INPUT);
  lcd.begin(16,2);
}
static int stock = 20;
void loop() {
  
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);
 
  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
   delay(250);
   int plus = ++stock;
     lcd.setCursor(0, 0);
  lcd.print("Number: ");
  lcd.print(plus);
  } 
buttonState = digitalRead(buttonPin2);
  if (buttonState == HIGH) {
   delay(250);
   int plus = --stock;
     lcd.setCursor(0, 0);
  lcd.print("Number: ");
  lcd.print(plus);
  } 


}

I hope someone can help me out, thanks in advance.

const int buttonPin = 2;  // the number of the pushbutton pin
const int buttonPin2 = 3;

Do you count uh-huh, two, three? Or do you count 1, 2, 3? Number ALL the related variables.

int buttonState = 0;         // variable for reading the pushbutton status

Which of the two switches would that be?

  pinMode(buttonPin, INPUT);
  pinMode(buttonPin, INPUT);

You are not using the internal pullup resistors, so you must have external resistors. How ARE the switches wired? Why are you not using the internal ones?

PaulS:

const int buttonPin = 2;  // the number of the pushbutton pin

const int buttonPin2 = 3;



Do you count uh-huh, two, three? Or do you count 1, 2, 3? Number ALL the related variables.



int buttonState = 0;         // variable for reading the pushbutton status



Which of the two switches would that be?



pinMode(buttonPin, INPUT);
 pinMode(buttonPin, INPUT);



You are not using the internal pullup resistors, so you must have external resistors. How ARE the switches wired? Why are you not using the internal ones?

I connected the first button to pin 2, and the second one to pin 3...
buttonState should be the first one.
I do have 10k resistors connected to my buttons.

Does anyone else have a tip?

"static" is useless here:

static int stock = 20;

Why do you not print "stock" instead of copying its value to "plus"?

int plus = ++stock;

Nevermind, I fixed it myself, it was a connecting mistake.