Indian Spider Identification
That’s maybe an oriental spiny orbweaver (Gasteracantha geminata), according to its appearance and location. You can find many more observations of such spiders on iNaturalist: https://www.inaturalist.org/taxa/207992-Gasteracantha-geminata?locale=en-GB
However, I don’t know what advantage there is to the “spines”. They are not the only species. There’s a whole genus of them with at least 70 known species, according to Wikipedia: https://en.m.wikipedia.org/wiki/Spiny_orb-weaver