How to construct a spline that conforms to the contours of the riverbank

I want to create two splines on the riverbank for procedural generation, is there any way?Now some points can be generated on the riverbank, but their index is out of order.