They came, didn’t find grazing grounds. Lost badly to fortifications.
And Delhi Sultanate had Cavalry Archers and Cavalry that were on par with Mongols as all refugees fleed from Mongol affected areas into Delhi and this was their do or die to defend against Mongols.
Later Khilji used his high morale army who just defeated mighty Mongols to raid and briefly conquer large parts of the sub-continent for a brief period.
Indians having the elephants thats the greatest thing ever, Mongol cavalary used to get ranscaked just by trampling or thuding noise of the elephants. That’s one of the many tactical other than strategical reasons that Alexendar could be defeated by a minor King Porus and what Arian wrote is the opposite of the reality. One minor example for this is Arian claimed that Alexander hugs Porus after the capture and forgiveness of Porus and his Kingdom, while the opposite is most likely the reality, Porus may had hugged Alexander after the capture and forgiveness of Alexander and his army. The only difference that excat locations where these and other events relating to Greco-Indian wars occured could be the same.
Other than that Darius III even though having elephants was tactically or strategically weak king and he and his army has morale Issues as compared to Porus and his armies. Then Romans already knew that Hannibal was moving elephants through the Alpes and marching to capture Rome, so they fortified and trained themselves well for the defense.
" the Mongols defeated the war elephants outside Samarkand by using catapults and mangonels, and during the Mongol invasions of Burma in 1277–1287 and 1300–1302 by showering arrows from their famous composite bows.[75] Genghis and Kublai both retained captured elephants as part of their entourage."