A cable fits both sockets and charges the laptop. You connect a display with it and nothing appears. The plug shape was compatible; the complete set of capabilities may not be.
Separate three requirements
Consider charging power, data transfer and video separately. USB-C describes a connector system, not a promise that every cable and port provides the same performance. USB-IF’s certification and labelling guidance distinguishes capabilities rather than relying on the connector’s appearance alone.
Read the specifications for the device, its port, the cable and any dock or adapter between them. A capability listed for one component does not supply it to the others.
Test the simplest connection
If a display is not working, check that the chosen computer port supports the required video connection and that the cable is intended for it. Try a documented, compatible direct connection before adding the dock back into the chain.
For slow file copies, check data specifications instead of using charging wattage as a speed indicator. For charging, check the charger as well as the cable and device.
Label the cables you already understand
Keep a small note or label for a cable’s known role: charging, fast storage or a particular display setup. Preserve the packaging specifications for new cables when useful. “Works with this equipment” is a valuable observation; “works with everything because it fits” is an assumption that will eventually waste an afternoon.