Techniques for identifying cables:
Obtain a continuous-tape style label printer and print the name of the device served, plus an equal number of spaces, on a label. Peel the label, stick it on the wire at the "half way along the label" and wrap it round, sticking the label back to itself
Use paint or similar liquid-that-dries (like Tipp-Ex style correction fluid) to mark the plug up with a pattern of dots (like dice) and mark the device with similar
Identify a section of the plug where wiring will not be present, and use a craft/exacto knife to cut small V shaped notches in the edge of the plug - different notches for different devices; has the advantage that it won't rub off or fall off like other methods. Will require something on the other end, like a written number of the notch count, to associate device with plug
Use cable ties/zip ties of differing colors to mark the cable with a pattern and an equivalent on the other end
Use heat shrink of differing colors to establish a pattern at the plug and peripheral end of the wire - you probably won't find heat-shrink that will fit over a plug but shrink enough to form a tight grip on the wire, so leave part of the heat-shrink on the plug and shrink it to a tight fit on the plug
Replace the USB cables with cables of different colors
Replace the USB cables with white ones and write on the plug end with a Sharpie/permanent marker
Tie a variable number/style of knots in the cable (don't pull too tight) as a way of coding/numbering the cables
Use a hot melt glue gun or other suitable adhesive to attach a different kind of material to each cable
USB plugs are typically all different thanks to different manufacturers - if you're still using the various USB cables that came with each device and they are all slightly different physically, a hand drawn legend, stuck to the case, of what each plug looks like and what it serves may suffice
Or, as clarified from your comments - you seem to only have an occasional need to disconnect these cables, when you open the case of your PC. I can't imagine that this will happen more than a few times a year, and some cables aren't long enough to allow them to remain connected. Pull the case out slowly, disconnecting cables as they pull tight. Upon re-installation, plug the dangling USB ends in anywhere where they'll fit - USB devices aren't fussy about the port they came out of/go back into so just plug whatever wherever
An exception to this is if you have a mix of USB port types - typically blue are superspeed/USB3, black are normal USB 2 and yellow are high power (good for charging or running hubs) ports. Rather than coding your cables for what device is served, you should consider coding them for what speed/power the device requires. It's likely that USB 3 cables (high speed) will already have a blue plastic part inside the metal shroud and an SS indicator on the plug:
These should be connected to a blue or SS marked port
It is unlikely that a device will have a yellow plug if it should be connected to a yellow port because the USB spec is quite strict about the power delivery capability and hence devices have to comply with it. As such, high power ports shouldn't be needed, but are advantageous to have for devices that don't play by the rules, or that can make use of higher power when available (phones etc may charge faster on high power ports)
Connect things that need charging, or hubs that will have multiple devices hanging off them (and not necessarily any external power supply), or devices that feature a motor (like non-SSD portable hard disks) to high power ports. If you see notifications like "this device has malfunctioned and windows does not recognize it", it may work in a higher power port, or a back-of-case port rather than a front-of-case port (front of case ports run off extension cables that can cause problems with higher power requirement devices)