Where do I find more parts to mod the guns?

You can remove attachments from other weapons to attach to your weapon, get parts to modify the guns via scrapping other guns, grab parts from the debug container though the MCM Menu or Settings Holotape, or build one of our custom vending machines in your favorite settlement in the Workbench section, then buy what you need from the built-in shops with Pre-War Money.