As the water in a residential heater does not exceed 160F and should be lowered to 120 outlet temperatures per many codes, it is better that heated water expands into the hot water line rather than sending a half gallon of warm water from the bottom of the tank into the cold line, so placing the expansion tank in the hot water line has some advantage.
Either line is fine. I usually install them on the cold side just because I don’t like the combination of heat and pressure, even though the tank is rated for it. The warm water in the tank won’t be useable as hot water drawdown anyway since the pressure is always above that of the precharge in the tank. Just be sure to install it downstream of an back-check devices!