How to make a health bar in Phaser 3

Anyone who has ever made an RPG game knows how important health bars can be to a game. However, this technique can also be used for timer bars or loading progress. This uses Phaser’s built-in graphics class and uses no images.