They sell them at all the home stores, look at the old one for it's specs. They are usually 16 VAC 40 VA transformers.
They never just go bad so you must have shorted the wires while changing the DB switch or chime unit on the wall.
Look on the door chime unit, it will likely say 16, 18, or 24 VAC. They are really picky on long wire runs and #18 AWG.
They usually mount into a hot electrical box knockout, you will need an electrician or know what you are doing to swap.
These transformers are internally fused and will blow the secondary instantly upon a short, so get that figured out FIRST!
The 24 VAC TX's are usually by the furnace thermostats, the 16-18 VAC TX's are by the smoke alarm detectors and DB's.
If you have an 18 VAC door bell and the total wire is 100+ feet, you will need the 24 VAC TX because of wire voltage drop.
* The same thing goes for the 16 VAC doorbells, extra long wire runs in large houses will require the 18 VDC transformer.