They both achieved independence and India even had a more developed infrastructure at the time. I don’t believe that any ideology or system is inherently better than others so what’s the deal?
Not big expert but book "The Elephant and the Dragon: The Rise of India and China and What It Means for All of Us" by Robyn Meredith explain a couple problems with India economic growth.
While PRC start economic reforms back in 1978, India was still under deeply socialized and sheltered market. In book there is situation where as measure to protect indian industry, imported computers spent years to pass byzantine import procedures, in effect India tech companies always had outdated and overpriced computers. State control import and export prices until mid 1990s, government forced companies to pass very extensive administrative procedures from institution known as Licence Raj to obtain "production concessions" before they start produce anything and later had a very strict rules how big company could be. A lot of India growth potential was tied to innefective parts economy like agriculture which is heavily government controlled.
While India does start solve this issues in 1991 under Finance Minister Manmohan Singh all proposed solutions was highly unpopular including rupee devaluation, open up for foreign investments, reducing price control and subsidies and exporting gold as collateral for 400 mln USD loan (India in 1991 had less than 900 mln foreign currency reserves) and cuts in deficit. And while plan was a success, it's never achieve similar success as in PRC. Bureucracy is still highly innefective, infrastructure is lagging to population needs, industrial investments are way too low (India industrial sector create less than 15% total GDP).
India after reforms while goes back to decent economic growth. Issue was with other reforms which hit the glass roof where was too little political will to further change in most inneffective economy branches like agriculture mixed with instability (conflicts with Pakistan, nuclear arms race and government instability) and economic problems notably global financial crisises in 1990s and early 2000s.
Now we go to PRC circa 1978, Deng began his reform in agriculture. The central government initiated price and ownership incentives for farmers, which enabled them to sell a portion of their crops on the free market. In addition, the government established four special economic zones along the coast for the purpose of attracting foreign investment, boosting exports, and importing high technology products into China. Additional reforms, which followed in stages, sought to decentralize economic policymaking in several sectors, especially trade. Economic control of various enterprises was given to provincial and local governments, which were generally allowed to operate and compete on free market principles, rather than under the direction and guidance of state planning. In addition, citizens were encouraged to start their own businesses. Additional coastal regions and cities were designated as open cities and development zones, which allowed them to experiment with free-market reforms and to offer tax and trade incentives to attract foreign investment. In addition, state price controls on a wide range of products were gradually eliminated. Trade liberalization was also a major key to China's economic success. Removing trade barriers encouraged greater competition and attracted Foreign Direct Investments inflows. China's gradual implementation of economic reforms sought to identify which policies produced favorable economic outcomes (and which did not) so that they could be implemented in other parts of the country.
Chinese also was encouraged to save money in banks and government in 1980s start large scale infrastructure projects.
Trade and fiscal policies, PRC used their position close to USSR as bargaining chip with talks with USA to gain access to US market, financial services and technologies (long list, eg. Ronald Reagan sold to PRC modern helicopters, ship engines, avionics, radars, US companies start joint tank project and People Liberation Army officers were trained at US military academies), artifical low yuan renminbi to US Dollar exchange rate makes chinese export cheaper and foreign currencies slowly fill PRC coffers. Being close to Japan, South Korea, Taiwan, Hong Kong and Malaysia, rapid growing economies in 1980s to mid 1990s also helps as PRC got additional investments and trade relations (according to book, first investors in formed Special Economic Zone was companies from Taiwan and Hong Kong, later join Japan and South Korea looking for cheap labour).