Why is the variable value not updated?

the value of the variable is not updated, even if a collision occurred. I don’t understand how to fix it…

let hungerPlayer = 20;
    
    let textHungerPlayer = hungerPlayer;
     
    this.add.text(40, 28, textHungerPlayer);

    this.physics.add.collider(player, hare, function() {
    hare.destroy();
    hungerPlayer += 50;
  }); 
}

The text part doesn’t make sense. Change to

let hungerPlayer = 20;
let textHungerPlayer = this.add.text(40, 28, '');

this.physics.add.collider(player, hare, function () {
    hare.destroy();
    hungerPlayer += 50;
    textHungerPlayer.setText(hungerPlayer);
});