if you run this code, does it start buzzing for 5 seconds ?
const byte BUZZER = xxx; // here put the right pin number
void setup() {
pinMode(BUZZER, OUTPUT);
digitalWrite(BUZZER, HIGH);
delay(5000);
digitalWrite(BUZZER, LOW);
}
void loop() {}
some buzzers need to receive a succession of HIGH and LOW to produce a sound. You would use the tone() function for that. other would make some noise when set HIGH as you do.
how did you wire the buzzer? did you set the buzzer pin as an OUTPUT?
Next after the print, you test the first byte of the payload for a value. Why not print that value, as well, then you will actually see if value is what you expect. Right now you are just guessing it is correct.
For one thing, you wrote that it is not working the way you want. So, perhaps those values are not where you think they are, or are not what you think they are. That is why we print things so we can track problems.