A hardworker's receipe - nothing clever here. See the cartoon:
Prepare a grid in the preferences. Here the spacing = 5mm, 1 subdivision. Set snapping to the grid =ON, no other snaps! Draw some grid spacing wide strokes with round caps. I typed stroke width = 5mm. Actually only one line was drawn, the others are copied, dragged and colored.
Adjust the places of the strokes. Be sure that the wanted final shape edge is fully covered by the both stroke colors. When you are fully happy with the formation, outline the strokes.
Take the pen tool. Insert a patch that fills the hole. Arrange it to the background.
Unite the patch and the brown shapes in the pathfinder panel. Arrange the grey shapes to top, select all and subtract the grey shapes from the middle shape in the pathfinder panel.
Add proper fill color (=a gradient here) and some stray shapes. One is made partially transparent in the appearance panel.
There are probably many ways to do this.
Here's one method.
Fill a rectangle with blue, rotate it about 45 degrees.
Enable the grid, and snap to grid to make placement of the shapes easier
Create two shapes like the examples below circled in red
Copy and paste the grey shapes randomly in the way shown below.
For the other side of the rectangle, reflect the grey shapes 90 degrees.
Add a gradient and some extra rounded rectangles to finish off the effect