Trying to use a buzzer, tone and noTone freeze my program

it's not wrong but unnecessary.

    if (buttonState == HIGH)
        ...
    else if (buttonState == LOW)
        ...

is the same as

    if (buttonState == HIGH)
        ...
    else
        ...