I think the best way to describe this is to say that relations between the two countries started out very badly, got better, and then got worse again.
After the revolution in 1917, the Soviet Union came to be and the US would not recognize it as a country. The US even tried to help overthrow it.
But then, during World War II, the US and the Soviet Union became allies. This happened because we thought Hitler was a greater threat.
After World War II, the Cold War started and the two countries became enemies for decades.