Manufacturers must want to maintain secrecy about 3-position motor speed switching, or 3-position electric blankets, etc. There could be more than one method, each hard to figure out and hard to fix.
Some motor types change speed according to supply voltage or current, some types according to AC frequency.
Your motor may be the type where two wires provide supply rails, and the third wire controls speed. If you give more information then it may allow our resident experts to assist you toward completing your repair job.
Does the motor nameplate specify 24VDC? It's a question whether internal driver circuitry requires 24V or whether 24 is safe maximum. Installing a buck converter can only work if the driver circuitry is versatile enough to run at various supply voltages.