When you do a search with: buzzer circuit diagram, you will find several solutions based on discretes and IC. A "DC buzzer" has an internal oscillator.
A piezo buzzer (beeper) has an oscillator (tends to use the
piezo element as a resonator within that loop).
An old school metal buzzer is basically a very noisy relay
with the NC contact in series with the coil, and the arm
attached to a diaphragm to slow it down and up the noise.
It self-oscillates on its mechanical resonance and the
electromagnet power.