It depends on whether you are approaching the question from a narrative perspective or an empirical perspective.
Narrative: The Federation wins because the Federation are The Good Guys™ and the Empire are The Bad Guys™. The Federation starts out on the back foot and it looks pretty grim in the middle, but ultimately they eke out a win. If this is a TNG two-parter it plays out the way “The Best of Both Worlds” did: engineering prowess combined with timely application of the human factor wins the day. If this is a DS9 arc or Discovery season, then Section 31 does what needs to be done.
Empirical: The Empire crushes the Federation like a bug. The Imperial industrial base is enormous and their power generation capabilities vastly surpass anything the 24th century Federation can muster:
It you could somehow snap these two spacefaring nations into existence and pit them against each other, it would be like late-WWII United States facing off against Napoleonic France. It’s a blowout.
The Empire can shield an entire planet. Those big spheres on top of a Star Destroyer’s command tower are shield generators.