Had the same question. Star Wars has often suffered from disparities of scale and other continuity issues, which the fans do their best to reconcile.
IMO, I would assume much sparser populations, to make things manageable. Galaxies are certainly large enough to host unimaginable populations, and the spacefaring history in Legends at least ranges 30,000 years to far earlier than 100,000 years previous, so its more than possible to be >400quadrillion. Given rough estimations, exponential growth is great that, even with incredibly slow <0.1% population growth (i.e., pop doubles every 1,000 years), you can quickly find that, given no frequent vast depopulations and no physics impediments that would prevent colonizing the universe, the known universe could be completely populated with all speculated habitable planets at a density far higher than Coruscant's proposed 1Trillion within 40-80,000 years (this is one reason I think there either may well not be other sentient life comparable to ours, or the physical impediments are simply too great).
To bring back down to the level of the movies, to even conceive of the scale where fleet engagements and group actions as shown might possibly have any impact, you really need to imagine as small as you can fit within canon statements.
So I'd take the minimum number of inhabited "worlds," figure most of them just have tiny colonies or outposts. The member worlds may be larger, but still parochial, even by modern earth standards. Only a few hundred or thousand reaching into the billions. And the "unknown space" is largely unpopulated.
What limits population growth? I don't know. Often-negative cycles from little family formation, for cultural or economic reasons, maybe.
Consider that 10,000 Jedi, while they were seriously understaffed and stretched, still managed to have a meaningful impact on the galaxy. Also that an Imperial Star Destroyer cost more than the GDP of some star systems (and cost figures in Republic credits thrown out there are under 4 billion, perhaps making it similar to our most expensive aircraft carriers). It would be a pretty tiny system, population-wise, whose GDP would be less than 400 billion "credits," let alone 4 billion, if Luke and Obi-Wan on could scratch up a few thousand to pay Han for a ride. To make the economics meaningful, you'd have to say that most systems were quite sparsely populated (a few million), and still jack up the price of the ISD by a factor of 10-100 (40billion GDP would be produced by 4 million people making 10,000 credits a year).
And if you don't, suddenly even the Imperial Star Destroyer isn't that big a deal. Financed across the years, many tens of thousands of them could be zipping about -- and so could their opposition. The Battle of Endor would be a minor skirmish, and the Death Stars and Super Star Destroyers would be only somewhat more significant undertakings. (Some sources seem to recognize some of these scale problems and I've even seen that one claimed 25,000 ISDs at the height of the Empire--which only lasted some 20-30 years, btw--which comes closer to fixing the scale but sacrifices the story impact; I've more commonly seen something like 500-1,000 star destroyers mentioned.)
So, beyond the theoretical carrying capacity of the galaxy, you've got to consider the story impacts most of all, and do your best to reconcile mentions of # of worlds, economic costs, populations, etc.
And really, doesn't an average of "a few million" people in population seem right, for a single Star Destroyer to terrorize and dominate a planet, with its <30,000 crew, <10,000 ground troops, <100 fighters, and <200 turbolasers and ion cannons? And wouldn't many planets, like Jakku and Tatooine, feel more proper on the sparser end of that? Even Naboo felt sparsely populated to me. Sure, these are offset by the Core Worlds with billions to even hundreds of billions (and whose economies might be considerably more inflated).
And and btw, given that a common population statistic on Earth claims that our 7 billion or so could live on common suburban lots and only cover the state of Texas, for Earth to look like Coruscant, whose whole surface is supposedly covered in cloud-touching stacked cities, we'd probably be accommodating far more than 100 Trillion people.