Both exhaust and muffler work together to improve flow and increase power... varies by RPM-region..
Trick for header section is to have proper length. You'll want somewhere between 20-24". Then use smooth 2-1 merge-collector. A LOT of aftermarket exhausts don't even use merge collector and just bend each header towards each other in U-shape. This actually causes exhaust-flow from each header to run into each other head-on; not good for flow.
Another critical measurement is diameter of pipe after the merge. It should be larger, close to 2x cross-sectional area of each header pipe.
Now, not sure which stock muffler you're talking about. Each one is sized for single cylinder. If you combine both cylinders into one and send it through one factory muffer instead of two, that'll be way too restrictive and you'll lose power. Want muffler optimised for 250cc flow each. Something like one muffler from EX500. Again, sizing is critical; using too large of muffler will hurt more than help.
So do maths, get optimum size header pipes of proper length. Make sure pipe after merge collector is proper size. And use muffler of matching size for engine. Multi-chamber muffler would be quieter than straight-through muffler.
You can see photos of various OEM and aftermarket exhausts I compared here:
https://www.ninjette.org/forums/showthread.php?t=338180