Simply put the Roman allies system was superior.
Rome slowly but surely made its allies part of its system, for every defeat of a neighbouring village Rome allowed the defeated village to become a part of the Roman system. Subdued foes fought for it as part of the Roman army, and while subdued elites were not Senators and didn't have citizenship they still very much formed part of the Roman system and reaped the rewards from being part of it.
This gave the Romans a huge pool of manpower to play with compared to other states. Especially when Rome started to be willing to hand out citizenship.
Carthage on the other hand was a city state, it relied on a couple of field armies led by a small core if its citizens and never made any particular attempt to expand its citizenship or rights to its subjects. Allies served as just allies for the campaign or war they were involved in. Foreign elites were bribed and given gifts but never really integrated. Soldiers were hired as soldiers rather than serving as part and parcel of an integrated army.
Its also worth noting that territory is not equal to resources.
Lets take the Second Punic War as an example:
While on paper Carthage was larger in the Second Punic War you need to examine which bits were under actual control and how long that was the case.
Carthage controlled much of North Africa and Spain, however only a chunk of North Africa was actually Carthaginian territory by itself, the rest of it was held by subject Numidians who had a frequently antagonistic relationship with Carthage. Meanwhile in Spain it was Hannibals father who had done much of the legwork in turning it into "Carthaginian territory" if we look at Spain at the time though it was made of a plethora of tribes and villages who were locked into a raiding and prestige lifestyle. Again this ensured the territory was in no way actually Carthaginian. These people were fighters, they fought for honour and for money with each other and against the Carthaginians. As long as the Carthaginians could give them money and show they were strong they would fight for them, the minute weakness was shown then there would be no incentive to fight, which is just what happened when the Romans started to make inroads to the area.
Compare this to Italy where Rome controlled a much more dense web of allies in the Latin states immediately around it, these areas where very much part of the system and willingly sent men to fight for Rome and kept on doing so throughout the dark days of Hannibal right until there were literally no more men to send. Its in the South where Hannibal made some gains amongst the former Greek city-states but even then surprisingly few of them turned and none of them were especially useful at reinforcing Hannibal when they did turn. In a way they crippled him because the more defected the more Hannibal had to protect and he had only a single army to do that with. Rome could very much grind him down and take city after city and leave him with no good choices to make.
Couple that with the crippling logistics issues with trying to get Carthage to actually reinforce him and you see why he couldn't win.
On that note we'll move onto logistics and politics.
Now logistically sailing in the ancient world relied on access to food and water for the crews, any attempt to reinforce Hannibal in Italy would rely on sailing for several days via hostile territory and in the face of enemy resistance and landed a few thousand more troops. Not exactly the easiest thing to do...
Politically there was also the clear difference between the Roman and Carthaginian senate. Each year the Romans could and did give clear priorities to one theatre or another and allocate resources for the entire state, this was light years ahead of the Carthaginian effort which only seemingly knew what Hannibal was about to do when the Romans arrived and asked to them to ensure he didn't cross the Ebro and attack Roman allies. There was a distinct level of infighting and not knowing what the left hand was doing compared to the Roman method of clear allocation and command responsibilities in the war effort.
Main source: The Punic Wars - Adrian Goldsworthy
To my mind, the decisive difference lies in morale. While it is difficult to know with certainty the exact percentage of the Carthaginian army that was made up of mercenaries, as the extant histories of the Punic War (particularly Polybius in this case) are all from Roman or pro-Roman authors, a telling difference can be seen in the conflicts that arose among the respective soldiers of both armies around the time in question. In Carthage's case, the Mercenary War erupted in the aftermath of the first Punic war over a payment dispute. By contrast, after the Second Punic war, Rome became a major world power, and in the campaigns that followed, the soldiers were in many ways pressed on both sides, with the land of the still largely unsalaried citizen militia being forced to go further and further afield in campaigns of conquest that they themselves reaped little from as their fields back home went fallow. Yet when open revolt did break out among the Roman forces a little over a century after the Second Punic war, it was over the citizenship status of the allied cities on the Italian mainland.
This points to a major disparity between the two groups of soldiers. One was motivated to fight largely by promises of material gain, while the other was a part of a culture that placed great emphasis on patriotism, honor, and sacrifice pro patria.
In terms of how this difference effected the actual recruitment ability of the Roman army as compared to Carthage, it can be helpful to look at the big picture. Mercenary armies, with the occasional exception (like the Swiss Guard), tend to be much less inclined to fight against heavy odds when compared to people defending their homeland or otherwise motivated by the above mentioned factors. The wars and strategic changes of the twentieth century have underscored the importance of these distinctions in the mindsets of soldiers, and it would be inconceivable for a modern nation to begin a conflict without serious consideration of how to best destroy the psychological drive to continue fighting in the adversary. For the Romans and their allies the fact that they stood underneath something bigger than themselves allowed them to hoist themselves upright after losses that would have devastated nearly any other army from the period.
Sources: Polybius - The Histories; Stephen Dando-Collins - Legions of Rome: The Definitive History of Every Imperial Roman Legion; Garrett G. Fagam - History of Ancient Rome (TTC Course)
One of the biggest factors, to me, is that much of the war was fought on Roman home soil where the Carthaginians and allies were unable to maintain long supply lines and rely on forage for supplies in the field for much of the war. Even despite the losses at Trebiae, Lake Trasimene and Cannae the Romans were able to maintain enough "army in being" to discourage most of the socii(Italian peninsular allied city-states) from defecting to the Carthaginians... with the majority who did being from areas rather distant from Rome itself. The Carthaginians came to the conclusion that they needed to destroy the Roman heartland and perhaps even take Rome itself which forced them into a setting where the were relatively unable to exercise tactical flexibility while Rome learned the lessons of giving open battle and simply shadowed the Carthaginians to make resupply and foraging virtually impossible by striking when any Carthaginians were detached from their main force(s) and would be defeated in detail. Unfortunately for Hannibal, and fortunately for Rome the Carthaginians didn't have a large enough force to siege a well-fortified Rome after Cannae... at least in the eyes of Hannibal.
As far as the issue in maintaining numeric parity or superiority you need to realize that the Carthaginians didn't bring particularly large armies to Italy but instead relied on the skill and equipment of their military. I mean ~50,000 troops is nothing to sneeze at but the total Roman population, including socii, was at least 2 million by the time of the Second Punic War... so raising troops was never going to be a problem. Now there were cultural issues at play as Roman Republican armies typically required certain standing and wealth but they opened up recruiting to virtually every free man in Roman territory after Cannae.
Carthage had issues with reinforcement of their own forces primarily due to the need to protect Carthage itself from hostile neighbors and the inertia of their own culture that had long made it unacceptable to recruit large numbers of genuine Carthaginians into their army and it's relatively limited population of less than 250,000 total inhabitants.
Frankly, I just don't see how Carthage could have realistically defeated Rome in an extended war anyways... I see some serious parallels between the Punic Wars and the Pacific Theater of WW2 in terms of economic and population disparity requiring a theoretical knockout blow followed by the recipient of said blow not suing for peace as expected.
Romans had gained control over the whole peninsula through treaties and deals with other Italians. The exact treaties varied but a common similarity was that when asked you were expected to surrender troops to Rome, in turn you may partake in the spoils (often land or property for the allies and movable spoils for the Romans). These gave the Romans a massive pool of man power that the Carthaginian's mainly mercenary armies couldn't not match.
Hannibal with no proper siege equipment and mostly light troops knew he had no chance of besieging the city itself. So he thought the next best idea was to separate the Italian allies from Rome. Hannibal began courting or forcing Italian towns and settlements onto his side, with some success. In 211BCE Rome had to besiege Capua who had defected to Hannibal. The majority of these allies had decided to stay loyal to Rome showing a sense of true patriotism, even considering many of these allies had no rights as Roman citizens, and had just in some cases recently been conquered by Rome only a generation or two ago makes their loyalty more difficult to understand. Assuming that life under the Romans had been kind to them, barbarians were scary, and fear of Roman reprisal were the motivating factors.
The powerful anti Barcid faction in Carthage not providing Hannibal proper support, the Romans massive pool of manpower thanks to their loyal allies, along with Publius guerrilla tactics stalled the Carthaginian invasion and eventually gave the Romans enough time to replenish and train new forces and begin their invasions of Iberia and eventually Scipio into Africa, forcing Hannibal out of Italy.
Follow up question
Can we really trust the numbers given to us by ancient writers in the first place? For all we know there could've been less than 10,000 Romans on the field.