How to make a piezoelectric transducer buzz louder?
Such transducers work best with higher voltages, like 9V or more. A straightforward solution would be to generate that voltage using e.g. a charge pump, then use the NPN transistor to amplify the MCU signal to that voltage. Depending on the project, you may already have that voltage available.

Another common option is to drive a small step-up transformer with the secondary winding connected to the buzzer. I have seen piezo transducers in fire alarms which are driven by 1:10 transformers, and those are indeed pretty loud.

A push-pull configuration (which should have the same effect as doubling the voltage) can be implemented with a single NPN transistor as well:







simulate this circuit &ndash; Schematic created using CircuitLab