It's not a curve which has varying width altough in vector drawing programs also that is possible. It's a filled area.
In GIMP or Photoshop you can draw a closed path. Corner points are made by clicking and the nodes with tangent handles are made by dragging and holding the mouse button at the same time.
Node editing tools allow radical edits. You can insert and remove the nodes, move them and adjust the handles.
These are also essential skills in vector drawing software (Illustrator, Inkscape)
In bitmap editors (GIMP, Photoshop) you can define the path to be a clipping mask of a colored layer. As well you can convert it to a selection and fill the selected area with a color.
ADD: The following is much easier in vector drawing software. It's from Inkscape.
A horizontal triangle was drawn and copied to the clipboard. Then a couple of curves were drawn, their strokes were defined to be the content of the clipboard.
Vector drawing programs have quite usable tools for bending a shape along a path. In Illustrator and Affinity Designer it can even be a photo. Inkscape accepts only vector shapes.
in GIMP: There's already another answer. You can define simulated pressure dynamics which tapers the brush and stroke a path with it. Possible, but I see it complex.
You can also apply curve bend filter or cage transform. Even more complex, no way to apply a drawn path.
Of course a highly skilled painter could draw it with a real brush, even with a graphic tablet, but you had excluded those options.