Re: "… but I don't think you explained the reason why the United States suddenly became so anti China in the last couple of years."
I think I have explained it AFTER MY FASHION… which is to say, my explanation may have been TOTALLY INCOMPREHENSIBLE to anyone other than myself. ;-)
Prior to the Nixon-Mao pact, I think it is fair to say that the U.S. and China were "natural enemies".
By this I simply mean they would be enemies by default: there was no reason for them to be allies, nor even for them to be indifferent to one another: hostility between the two was "natural".
The alliance created in the Nixon-Mao period was (in this sense) an "unnatural" product of peculiar circumstances.
It is amazing that it lasted so long: the rationale for the U.S. and China joining forces to oppose both Russia and India made little sense (ca.) 1971–1976… but it made less and less sense with every passing year thereafter.
Under Joe Biden's dominion we have returned to the "natural" state of affairs: Russia and China are allies, with America opposing both of them (as opposed to Nixon's strategy of an alliance with China against Russia).
There was absolutely no good reason for America to have been supporting Pol Pot ("the Khmer Rouge") in Cambodia… BUT IT HAPPENED as a consequence of Nixon's strategy.
In politics, irrational and unnatural arrangements can last a long time, if nobody is going to earn money or glory by questioning them, challenging them, and overturning them —with any of the three quite possibly costing you your life (without earning you much in the way of money or glory).
It makes absolutely no sense that Bill Clinton continued the policies of Richard Nixon… BUT HE DID.
I genuinely doubt that Clinton himself could give you a reason as to why; it is impossible to imagine George W. Bush could give any coherent account of his thinking, in this regard.
Alas, the Mao-Nixon pact really would be tremendously important in shaping the politics of the G.W. Bush years: America would continue to be in a phony alliance with Pakistan (as a bi-product of the alliance with China against India) that rendered the occupation of Afghanistan a self-contradictory and unwinnable war.
G.W. Bush went into that war with all the wrong alliances: he would have been much better off in an alliance with the Russians, working to extend their control and influence throughout Central Asia (including Afghanistan) in opposition to both China and Pakistan —and it would have been better still to work with India (likewise to extend India's influence into Central Asia, and Afghanistan most of all). What was impossible was to do exactly what Bush attempted to do, with Obama being fatuous enough to "double down" on his mistake: it was impossible to fight with Pakistan against the Taliban. Pakistan and the Taliban were one and the same side.
So… Nixon's dubious strategic decision would metastasize into the hopeless stupidity of G.W. Bush.
And today we have finally returned to the "natural" order that existed between the end of WW2 and 1971: with Communist China and the United States being enemies. There is, simply, no reason for them to be friends.