Controlling an LCD screen with buttons

Hello,
I am in my first semester of computer programming and having trouble with assignments relating to the Arduino. I am currently trying to get an LCD screen to switch between displaying my name, my hobby, and my favourite food. I am able to get my name to show up, but the button doesn't register when it's being pushed so it does not go to my hobby, and the serial monitor does not display the corresponding message. Looking for some guidance as to what I'm doing wrong with these buttons? Unfortunately my teacher is no help.
Thanks in advance

#include <LiquidCrystal.h>
//Initialise the Serial LCD.
LiquidCrystal lcd( 12,11,5,4,3,2); //These pin numbers are hard coded in on the serial backpack
//board.
const int button = 8; 
int counter = 0;
int buttonState = 0;
int prevButtonState = 0;

void setup()
{
	lcd.begin (16,2); //Initialize the LCD.
	attachInterrupt(digitalPinToInterrupt(button), button1, CHANGE);
	Serial.begin(9600);
}
void loop(){ 
  buttonState = digitalRead(button);
  if (buttonState == HIGH) {
      Serial.print("test");
  for (counter = 0; counter<=4; counter++){
   	  lcd.setCursor(0,0);
   	  lcd.print("Char M");
  }
 
    
    if (buttonState == HIGH) {
  Serial.print("test2");
  for (counter = 0; counter<=4; counter++){
      lcd.clear();
   	  lcd.setCursor(0,0);
   	  lcd.print("Cars");
  }
 }
}
  
  else if (buttonState != prevButtonState) {
    if (buttonState == 3) {
    Serial.print("test3");
    for (counter = 0; counter<=4; counter--){
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Meatballs");
    }
   }
 }
}

void button1 (){
  Serial.print("test");
  lcd.clear();
  counter++;
}

Detect when the switch changes state.

When the switch is pushed increment a counter.

When the counter is 1 print name.
When the counter is 2 print hobby.
When the counter is 3 print food.

There are multiple issues here:

  1. You shouldn't use any type of resource that depends on interrupts inside of an interrupt. Like Serial or LCD functions.
  2. Variables shared between the ISR and non-ISR (e.g., loop()) code should be declared with the volatile keyword.
  3. Any multibyte variables on an AVR (8-bit) processor should be protected by disabling interrupts when reading them or modifying them in non-ISR code (e.g., loop())
  4. You really don't need an interrupt to process a button. It can cause issues and is more trouble than it is worth.

Look at the tutorial StateChangeDetection

Hello charmarch

Take here a view to gain the knowledge.

Simplify the process. The button has 2 states. So create a variable that changes everytime the button is HIGH.
ie. If button is high state = 1. If button is HIGH again and state = 1, then state = 2. If button is HIGH again and state = 2, then state = 3. Next time round return the state back to 0 or 1.
Now you have 3 possible states. Create an if statement that addresses each state condition.

Also you might want add some code to handle the debouncing of the button