Transformers have no moving parts and are not typically prone to failure. Most failures we see are caused by an overload condition such as a shorted wire or a failed electrical componet. The problem will be located on the secondary side of the transformer which is the 24 volt side. Most shorted wires occur where the thermostat wires enter the metal cabinet on the furnace or outdoor unit. Every now and then insulation will get removed from the wiring allowing a short circuit by rodents under a house or in a wall. Sometimes the outdoor unit wiring can get damaged by trimming to close with a weed whacker or lawn mower.
A transformer has a VA rating. VA stands for Volts X Amps. If the output voltage is 24 volts and the VA rating is 50 the transformer is transformer is capable of 2 amp output (50÷24) or VA÷volts. If you check the amp draw and it exceeds the 2 amps the transformer is overloaded and will fail.