To get Upgrade Modules, you must either purchase them or earn them from a particular mission in the game, along with occasionally getting them from the season pass.
The main method or activity for getting the upgrade modules would be bounties from Banshee-44. To get a bounty from Banshee-44, you must first visit them back at the tower at his shop.
Related: Destiny 2 Codes (May 2021)
From there, they should give you a quest that can be completed weekly for a number of rewards, including upgrade modules. Banshee-44 will also sell the modules via his material exchange for the following in return.
- 5k Glimmer
- 25 random materials
- One Enchantment Core
- 10 Legendary shards
However, the price is pretty high, so we only recommend going with the buying route if you can afford it. Because of that, you are probably better off in the long run just farming bounty missions every week. Another farming option would be the Nightfall strike, as you can get them occasionally as a drop, so we recommend farming it.
That being said, once you get a few upgrade modules, you will be able to use them to boost the power level of a weapon you like. But to use upgrade modules, you will also need to sacrifice another weapon in the process.
For more on Destiny 2, we recommend checking out both How to make a clan in Destiny 2 and Destiny 2 Chicken error code explained and solutions