First off, they don't do anything at all. At least not in the eyes of improving your character. They are a purely cosmetic thing, so they are great for people who care about how their weapons look. But they will not modify your weapons or abilities in any way.
What they instead do is customize your weapons. Ever wanted to have keychains or small objects attached to your weapons? At least now you have the chance. There is a huge variety of weapon trinkets, so there's something for everyone here.
Most weapon trinkets work for a lot of weapons, but some are tied to specific weapon types. The weapon trinkets are not consumed on use, and you can even use them on several weapons at the same time, so feel free to use the weapon trinkets on any weapon without worrying about saving it.
Most trinkets are seen by your character when you play from a first person perspective, but not all. The ones that don't are clearly for online play where you can brag to other people and show of.
How to equip weapon trinkets in Borderlands 3In order to equip a weapon trinket to your weapon, open the ECHO menu and head to the inventory screen. Highlight one of the four equipped weapons and click on X/A/mouse button to open the trinket menu and select which trinket you want to use for that weapon.
After having equipped a weapon trinket, do the same thing if you want to change it. You can equip or change weapon trinkets at any point, free of charge. This means that you are free to change them as many times as you want to see how cool they look on your character.