Driving a speaker with a 3.3 V processor
The open-collector transistor amplifier you've drawn is appropriate (if it had a base resistor and an audio-taper pot) for a small magnetic speaker with a coil, which is a current-mode device.
Your piezoelectric transducer is more of a voltage-mode device; essentially it can be thought of as &quot;a capacitor which makes noise when its level of charge is rapidly changed&quot;.
The problem with your circuit is that you can only charge the capacitor, not discharge it.  And once you apply the charge, it would take a long time for it to leak away, so you'll get at most a single click from this.
One simple fix would be to add a resistor across the capacitor; in fact that's precisely one of the circuits you'll find on a data sheet.  The transistor applies charge, the resistor drains it away, so now you can get the charge to change and noise to be made.
You actually may not need the transistor at all though: for moderate volume applications you can likely drive one side of small to moderate size piezo right from an MCU pin.   You  could even double the applied voltage by driving the other side from another pin controlled with opposite phase (though no, that won't make the sound twice as loud).
As an interesting anecdote, the audio generators in the &quot;snap circuits&quot; toy also have unipolar output drive, and are meant to be used with a magnetic speaker connected between that and one of the supply rails (I forget which, but given the unipolar drive, only one way will work).   The toy also happens to contain a piezo element, which the audio generators seemingly  will not drive.  But if you then add the filament lightbulb or the resistor elements across the piezo, now you get sound.  It's either the identical issue as in your circuit, or the inverted image.