This page of Cyberpunk 2077 guide describes how to install and change weapons and armor/clothes modifications. We also describe the rules of changing installed mods to other ones.
The most important information is that you cannot install the modifications in all your weapons and armor parts. This is only allowed for those items that have free slots . An example of a weapon with free mod slots is presented in the picture above.
Modification slots work independently of accessories installed on weapons - scopes or barrels. Accessories can be exchanged for others without any restrictions.
Mods can be found primarily in the game world - look for them in different types of containers and search the bodies of defeated opponents.
Some of the weapons and armor found in the game may already have some mods installed. In such a situation, you can remove or continue to use them.
Alternatively, you can craft modsor buy them from merchants. In the latter case, try to visit an appropriate NPC, e.g. a clothing merchant, if you want to buy an armor mod.
Mods have identical quality classes for weapons and armor, so the most valuable modifications are rare (blue), epic (violet) and legendary (gold).
Stat bonuses offered by modifications are automatically added to the item description. After highlighting a given item you can view the list of offered stat bonuses. If some bonuses are identical (e.g. bonus to the number of armor points), they will be automatically added up.
Unfortunately, you cannot freely change the installed mods or take out modifications that you do not want to continue using. Removing the modification from the slot is associated with its destruction. This can be particularly burdensome if you have installed a rare, valuable mod in an item.
You can limit this problem by installing the most valuable mods on items you believe you will use longer. We are talking in particular about iconic and legendary weapons and costumes. These types of items have great stats at the start and you can try to improve them further by relying on crafting to extend their usefulness.