Both Cap Collector and Local Leader perks are necessary for building trading stands in settlements. Specifically, it is required for the surgery centers, restaurants, weapons, armors, clothings, and trading emporiums.

To invest, enter the shop UI; at the bottom the screen will show an option to invest.

Investing 500 bonus caps into their inventory applies to all instances of that particular trading stand across all player-controlled settlements. With minimum 3000 caps invested, one can raise the available caps at all of the trading stands, for all future stock refreshes, at all of the settlements.