Himalayas actually should have protected India. Not China. China had no natural barriers to protect from the hordes of barbarians residing in the north of China. In fact no country has fought more barbarians than China. China had to deal with the Xiong Nu (The Huns), the Dong Hu, the Khitans, the Jurgens, the Mongols, the Manchus, the Xian Bei etc. There is a famous old saying Wu Hu Luan Hua meaning Five barbarians create havoc.
Its not easy to fight these barbarians. They have no cities, little belongings and they move from place to place in the vast grassland. The only way to fight them is the keep chasing them until the end of the world. Or build a long wall.
Europe only had to deal with the Huns. If there was no Himalayas South Asia would well be overrun by these barbarians.
All the Barbarians came from the West in India.