Not a historian, but have read a fair bit on Indian history. Firstly it did not take EIC just a “few years”. It took them almost 100 years before they started getting involved in Indian politics, another 50 years before they became the unquestioned dominant political and military power India.
Although the EIC had been giving trading rights in 1612, this was when the Mughal Empire at its peak and it would be another 100 years before the Empire would go into decline thanks to military overstretch, bankruptcy caused by decades of unending expansionist wars under the last “great” Mughal emperor Aurangzeb. It was in his reign that the Empire achieved its greatest size, encompassing almost all of modern India, Pakistan, Bangladesh, and even parts of Afghanistan.
However, within 30 years of his death the empire he had created had fallen apart completely. Civil wars among his successors made an already unstable situation much worse as provinces broke away and formed their own kingdoms. I
Into this vacuum entered the EIC. At first it was to simply protect their commercial interests, but they soon realized that conquering and taking over territory was far more profitable. As a result by 1760 they had not only taken over a good chunk of India, they had actually conquered Bengal (although nominally it was still ruled by a local ruler), the richest province of India. What they then did to Bengal is a story in itself.
These conquests in the 1730-1760 period were made possible by total disunity in India, and the EIC army having tactical superiority thanks to adoption of latest European military tactics developed by Frederick the Great. Plus EIC adopted a political tactic first developed in India by the French East India Company, that being to play one local potentate against another, supporting one militarily, and in return getting very profitable and generous trading privileges from the winner. Removing the winner from power and replacing him with someone more compliant if the ruler became too independent or took steps to curb the Company’s activities.
The result of all this was that by 1775 there were only 3 regional powers in India they were capable of opposing the EIC, these being the Maratha Confederacy (roughly north and central India), Hyderabad (roughly central) and Mysore (South). Basically each was taken on individually and destroyed by military means and political chicanery (bribing key officials to betray the ruler). Of the 3, only Hyderabad survived because they refused to take on the EIC, and eventually was absorbed into British India as a princely state.
In between the Mughal Empire, which had shrunk to just some areas around Delhi (the capital), enjoyed a brief revival under In the late 1700s, but that ended with the death of the great reforming General Najaf Khan. Within months of his death, court intrigue led to command of the army being given to a total novice who promptly led it to utter defeat. For all intents and purposes the Mughal Empire ended then, although on paper it continued till 1858, with all local rulers and even the EIC paying fealty to he emperor, and claiming all their actions were on his behalf.
Full conquest of India was completed in 1858, when the last truly independent Indian kingdoms were incorporated into the British Empire after the Mutiny. Even then large chunks of India were nominally independent under local rulers. Although each “independent” kingdom (known as princely state) had a “Resident” appointed by the colonial government to keep the rulers in line.
Incidentally EIC also pioneered the use of the dont-tax-us-or-we’ll-take-our-factory-and-business-to-another-province/kingdom gambit. Ultimately the EIC became too powerful to tax.
After their victory against the Mughals, as a condition of peace the EIC got exclusive rights to collect taxes of Bengal. With access to taxes from the richest province of India, financially the company was secure. No local ruler could match their financial power which in turn translated to superior military strength, and ability to bribe officials and foment distrust to prevent alliances from forming.
If you are really interested in history of India during that time, I highly recommend William Dalrymples book The Anarchy.