There are literally dozens of mods to unlock for some weapons, so I recommend grabbing everything you can, and scrapping everything you can. You’ll earn lots of different mods by scrapping Pipe guns, but you can also get mods for Syringer Rifles that drain enemy strength, longer barrels for your shotgun to improve accuracy, or special receiver that change the firing rate on assault rifles. To unlock mods, you just need to scrap weapons with the mods you want. You’ll have to grab each mod separately, and you’ll do that naturally as you play - if you’re scrapping weapons. Because of the perk card system, there’s no straightforward way to simply unlock new mod options when you’re customizing weapons.
These extra pieces are called “mods” - and installing them has changed slightly.
Weapon customization returns in Fallout 76, and you can mod your weapons up with a variety of powerful configurations.