Ancient Indian civilization was conquered by the Aryans, and died. In 1526. Mongolians conquered India again and established the Mughal Empire; the ruling class was Mongolians, and the culture was Islamic.

In 1600, the East Indian Compay colonized India. The ruling class is Anglo-Saxon with a Christian culture.
So India was colonized by Islam for 300 years and Anglo-Saxon for 300 years, with 200 years of overlap. We know what 300 years of colonization can do to indigenous culture. Go to the US and try to find an indigenous culture.
Ancient Indian civilization was located at Indian River Valley. Where is the Indian River Valley? The Indian River Valley is located in Pakistan, now the China-Pakistan Economic Corridor.
So India has a long history and culture. But modern India is not the same demography, not the same geography, and not the same culture as ancient India.
Comparatively, Japan has a much longer continued history than India, but shorter than China.
Japan belongs to the pan-Confucian culture. Japanese civilization rose by learning from China. Japan borrowed Chinese characters to invent its written language. Japanese culture is more westernized than China, remains the same geography and demography as ancient Japan.
An advanced civilization needs an accumulation of culture. The more culture accumulated, the more potential to advance. Indian culture has been interrupted many times, so it is backward compared to China and Japan.