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

Could you point what is wrong with OPs if else code, I’m not seeing it