On the web page you may have noticed that the instructions at the top state you’ll be using the passive buzzer:
We have used active buzzer in the previous project, this time we will use passive buzzer.
But, in the wiring instructions it says to use the active buzzer:
Two types of buzzers are included in the kit. We need to use active buzzer. Turn them around, the sealed back (not the exposed PCB) is the one we want.
Although it likely won’t cause any damage, you’ll have much better results if you install the passive buzzer for this project.
Notice, please, that your link is not the same as my link. We’re linking to two different pages covering the same tutorial. Yours is the Arduino page and is correct, mine is the Micropython page and is not correct.