What led the United States and the Soviet Union to change from allies to enemies?
The main reason for this is that the United States and the Soviet Union were never true allies in the first place. Instead, they were only allies out of convenience. The US and the Soviet Union never actually liked one another. It is just that after Germany invaded the Soviet Union (and after Japan attacked the US) both countries needed one another.
The US and the USSR were never very friendly. The US did not even recognize the existence of the Soviet Union (diplomatically speaking) until 1934, 17 years after the Bolshevik Revolution. The US even sent troops to try to help the Bolsheviks’ opponents in the Russian Civil War. This was because capitalism/democracy and communism are systems that are diametrically opposed to one another.
During World War II, the US and the Soviet Union needed one another. Therefore, they were able to function as allies. But as soon as the war ended (and perhaps even before), they were back to distrusting one another. This is why they were allies in World War II but enemies as soon as the war ended.