USB-C is a connector shape, not a capability. Two cables that look identical can differ hugely: one may carry only slow charging and old-style data, the other high wattage and fast transfer.
Charging speed is negotiated between charger, cable and device. The slowest link sets the result, so a fast charger and a fast phone still charge slowly on a basic cable.
Data is separate again. Many charging cables contain no high-speed data wires at all, which is why a phone charges from a cable that refuses to show up on a computer or drive an external display.
Cables also wear internally. A cable that charges intermittently when moved has broken conductors and should be replaced rather than nursed along.