I don't think this has anything to do with the competition between China and America. This a border dispute which dates back to 1920s when the British were ruling India. If you check it you could see that almost every year, there will be a border issue between the two countries and its the same with most of the neighbouring countries.
In the 1920s the dynamics of geopolitics, geostrategy, and geoeconomics were not as complex as today. The 1920s were still in the era of colonialism and warlordism. China and India are not sovereign and are considered to be the forerunners of large countries like now. The global system began to take shape after the world war with America and its allies as the winners and runners-up Russia.
The political and economic constellation of the world is now increasingly complex in line with the times and technology, as well as the overlapping interests between countries and non-state actors. The US is implementing a containment strategy for China. Japan is used to contest China from the north, the influence of China on the Peninsula was contained by South Korea, then Taiwan on the other side and the last was on the side of Southeast Asia, the US tried to contradict the US-Indo-Pacific. The failure of the US to make Hong Kong the entrance of democracy to China, leaving India and Pakistan a means of containment for the US, because Myanmar and Cambodia are clearly inclined towards China. It is feared that Pakistan will make things difficult in the future because the US has already fought Islam and realized that Islam is spreading.
The choice of the US fell to India other than because the large population of India could become an economic base to rival China going forward. The military power of China and India is 3rd & 4th, both of which have nuclear as a scarecrow. The US is fully aware that China's target areas are Southeast Asia and the South China Sea. For China, this region is the middle east for the US. In Southeast Asian countries, China has built a lot of smelter infrastructure to hegemony new and renewable energy sources, namely batteries. The battery will change the status of China from a country with energy dependency to become energy self-sufficient. And reversing America's position from price maker energy to a price taker. In addition, Southeast Asia and the South China Sea are regions that are also rich in natural resources which will be enough to guarantee China's food security in the future.
The current focus of America is on China, India, and Indonesia. Because on the East side there are American and Australian military bases in Papua New Guinea that will welcome China and military bases in the Philippines can be reactivated immediately.