USB-C was meant to end cable confusion. The plug is universal. Everything behind it varies enormously and is barely labelled.
What can differ
Data speed, ranging from the old USB 2.0 rate to speeds fast enough for external drives and displays. A cable at the bottom of that range and one at the top look identical.
Power delivery, from a few watts to enough to charge a laptop. A thin cable will not carry high power safely.
Video support, which some cables carry and others do not.
Thunderbolt, which is a higher specification that uses the same connector.
The practical consequences
A phone charging slowly on a cable that charged it quickly before. A monitor not working through a cable that carries data fine. An external drive running at a fraction of its speed.
In each case nothing is broken and the cable is the wrong specification.
How to tell
Look for markings. Thunderbolt cables carry a lightning symbol with a number. Some cables print the wattage or speed. Many print nothing.
The realistic approach is to buy from a manufacturer that states the specification, and to label your cables once you know what they do.
What to own
One or two high-specification cables that handle everything, used for anything demanding. Cheap cables for charging a phone overnight, where speed does not matter.
That covers every case without needing to identify each cable individually.