Example photo is attached. Been trying on my own with the pen tool all day and having no luck...
There are probably many ways this could be done. Here's one that is relatively easy. What follows just covers the basics, hopefully enough to give you a general idea. You'll have to use your imagination for the rest.
- If achieving a smooth curve is the problem, which not always so easy with the Pen Tool, then instead you could try using the Curvature Tool to make your initial curve. This tool should ensure a smooth curve as long as you don't use too many anchors. If you don't get it quite right first time, you can move the anchors until it has the curve you want.
- Copy and paste it so you have two strokes, make the copy a darker stroke colour, and again by using the Curvature Tool, position the darker stroke so that it overlaps the first.
Select, then Group both pieces using Ctrl+G.
Paste in Front using Ctrl+F, and set the stroke to black.
Select everything again, open the Appearance Panel, click on Opacity, and hit the Make Mask button, and choose the Invert Mask option. This basically uses the pasted black stroke as an Opacity Mask over the top of the Group
- At this stage the darker stroke is still editable non-destructively. You can select the darker path in the layers panel by hitting the Target button, and then move it using the Curvature Tool to refine the design. The mask will reveal only the part of the darker stroke which overlaps inside the lighter stroke.
Here's another approach, which considers the shape as one curve which can be bent as a whole (see NOTE1).
Divide a rectangle to areas with drawn lines (see NOTE2)
Use the Shape Builder to define the areas (see NOTE3) and to remove (=hold Alt key) the unwanted pieces. I filled my areas with greys only to show they are separate colorable areas, the greys are not there in the next phases. Drag the shape to the Brushes collection and define it to be an Art Brush.
Draw a smooth curve. Use as few nodes as possible, maybe only 2 or 3
Apply the new brush
Use the width tool to make line width changes. I guess here are too many of them for your taste. You may need to adjust also the handles of the path nodes because it's easy to cause some foldings at the edges by having too tight curvature.
Expand the appearance (=Object > Expand Appearance), ungroup and select the colors. These are random ones, one is a gradient. The pieces are now separate, so they are independently editable, movable and colorable.
The solid colors can be there already in phase 2. Gradients must be added in phase 6.
NOTE1: Drawing the parts separately, of course, gives full freedom, there's no problems with edge foldings nor other Illustrator's internal math obscurities. But this method may be useful to keep the things together.
NOTE2: If you are going to make tapered ends with the width tool, do not have areas which contract to zero at the ends already in the rectangle.
NOTE3: As well you can apply Object > Path > Divide Objects Below.