The following schematic is a kind of adaptation of the old vibrating reed relays that were used "back in the day" when someone wanted to place a HAM radio in their car trunk. (They need hundreds of volts for the plate voltage of their vacuum tubes and a \$6\:\text{V}\$ or \$12\:\text{V}\$ car battery just wasn't, by itself, up to it.)

simulate this circuit – Schematic created using CircuitLab
\$R_2\$ is fairly simple. It may be zero Ohms or it may be some other value. But having it allows you to adjust the coil current in the relay coil so that you get just want you want. I recommend keeping it and then adjusting it until you get a vibration frequency you want. This may mean selecting a relay specified for less than \$12\:\text{V}\$ coil voltage. Regardless, the coil voltage and this resistor are your means of getting the relay frequency you want. (You could also include a capacitor, but I don't recommend playing that game right now.)
\$R_1\$ and \$C_1\$ make up want is called a "snubber." These are needed to damp out the coil energy when it is disengaged from power and its magnetic field energy needs to be dissipated. (\$R_2\$ participates in this snubbing, too.) Again, designing those two parts means knowing a lot more about the relay coil. So for now, I'm merely pointing out that you need them. (A diode or a diode and zener might be another approach to try out.) Aside from snubbing, they may also have an impact on the frequency and robust behavior (or lack of it) of the overall circuit. So the process of coordinating the relay coil's mechanical mass and natural frequency details, coil inductance and internal resistance details, and the two resistors and the one capacitor needs awareness and probably some work to get into the right balance. (This is part of why I probably would not use a diode for energy dissipation. I want an additional degree of freedom for tweaking things.)
Other than that, I think you can see that a small transformer with a center tap is used. At the beginning (say, \$t=0\$), the relay coil is directly powered by the power supply with possible current limiting added by \$R_2\$. But also, one half of the transformer is also powered (the upper half, in this diagram.) The relay pulls at the switches and they move towards the other position. (You will need to make sure it reaches that new position due to enough momentum to get there.) Make sure you get a relay that supports switches that "break before make." When the new switch position is hit, the alternate (lower) side of transformer gets actively powered while the relay coil itself loses direct access to the power supply rail and so it loses power and also its magnetic field collapses. That field energy is then dissipated through \$R_1\$, \$R_2\$, and \$C_1\$. When the relay returns to its prior position, due to the loss of its magnetic field, the process starts over.
The upshot is that you've created a "mechanical switching" inverter supply and the output of the transformer will be a useful AC voltage.
The faster you can get the relay to operate (low mass is good), the smaller the transformer can usefully be. Faster is much better if you want "small." However, of course, that has an impact on the relay life, too. And, of course, you need to take into account your alarm that may be attached at the other end. Too fast and the alarm doesn't perform well for you. So the whole thing is a balancing act, of sorts. But it has the advantage that you don't have to be a mathematical genius to tinker with it until you get what you need.
If you can actually find a vibrating reed relay to use, so much the better. But they are antiques now and probably cost money. And they were "big" back then. So with modern, tiny relays there is an opportunity for a smaller "system."
Here's a picture of the inside of one of the old vibrating reed relays:

You can see a weight or mass near the top of the thin, vertical "reed" which is used to adjust the vibrating frequency (add or subtract mass.) You may also note the screw that enters from the right side and touches the reed from the right. That formed one of the switches and you could also adjust the screw (press harder or less hard on the reed when it wasn't operating) to also adjust the frequency. The mass and the screw have differing impacts, so making this thing work "properly" involved adjusting both the mass and the screw to get "perfect" behavior.
[The above picture comes from a video produced from "Mr. Carlson's Lab", which you can view in its entirety here.]