This is a complex job in illustrator as 2D drawing:
- gloss and reflections on the plastic wire shields
- changing foreground-background order due the curvature
A receipe would take a day to write.
You can make a good intermediate drawing with 3D as you have thought, but you cannot make extrusions curved afterwards, you must start with 3D revolve.
This is a grouped set of circles which has got Effects > 3D > Revolve.
All settings are essential. Learn them from Illustrator user's quide. You will not get interwire reflections. Illustrator isn't capable enough for photorealistic 3D renderings.
You can recall and tweak 3D settings until you expand the effect to 2D. Only click the revolve effect row in the appearance panel.
You can continue as 2D after applying Object > Expand appearance. Beware: You will get a complex group of small objects.
You can get different lengths to the wires by revolving them separately. Then you must swap the foreground -background order with masking as user Billy Kerr has shown in his answer.
Not asked, but in a proper 3D program you get also the rest of your cables virtually as easily as the outer parts in Illustrator. I did a test. The following took only few minutes. The interiors of the magenta cable are quite simple extrusions at the end of the magenta part. In Illustrator they need much more work.
This is drawn in a freeware CAD (Design Spark Mechanical) which hasn't photorealistic rendering, but the model can be rendered in other software.
This rendering is from an introductory version of Keyshot. It uses only screen resolution. Available control and the list of possible materials are minimal, but the image can still be useful. It can be used as a guide for adding glosses and reflections manually to Illustrator version (= a job which really needs well polished drawing skills, it is beyond the possiblities of a novice and occasional users)