Mufflers on generators make the generator quieter by dispersing the exhaust gases that come out of the motor. The more the gases are dispersed the less noise that is produced
The expensive way is to install a commercially available product (like the Supertrapp Quiet Muffler). A more affordable option would be in install a stock motorcycle muffler, available used, in like-new condition from just about any motorcycle shop (because the owner wanted a custom model) but some fabrication will be required to install it.
Here are a couple of options for some quiet mufflers for generators. Super TrappTM Quiet Mufflers, Briggs & Stratton Quiet Mufflers ,and
Tecumseh Quiet Mufflers they should do the job nicely.
A generic muffler is a good choice for noise reduction. They are fairy inexpensive in comparison to other mufflers you may find that are of the same quality.