A Variac (common brand name for a variable autotransformer) is a way of providing an adjustable AC voltage from mains. Usually, they go from near-zero to about 120% of the supply voltage, or thereabouts. Normally, you plug it straight into the mains, but if you plugged one into a step-down transformer with a 24VAC output, the output of your Variac would be capable of about 0 to 26 VAC, or thereabouts. A Variac has a current limit, which must not be exceeded, neither on the input side nor on the output side, so beware of this.
Or you could use a function generator, perhaps followed by a buffer amplifier. That would give you flexibility in frequency as well as voltage.