Here is one way:
Needs["NDSolve`FEM`"]
pts = {{1, 1}, {2, 3}, {3, -1}, {4, 1}, {5, 0}};
f = BSplineFunction[pts]; bm1 =
ToBoundaryMesh[DiscretizeGraphics[ParametricPlot[f[t], {t, 0, 1}]]];
bm2 = ToBoundaryMesh[Rectangle[{0, -1/2}, {6, 2}]];
(* ResourceFunction["FEMAddOnsInstall"][] *)
Needs["FEMAddOns`"]
bm = BoundaryElementMeshJoin[bm1, bm2];
ToElementMesh[bm]["Wireframe"]

Another approach can be seen in the documentation here:

Stealing from @kgl's answer:
img = Import["https://i.stack.imgur.com/Hp0Z3.png"];
bmr = ImageMesh@img;
ToElementMesh[bmr]["Wireframe"]
ToElementMesh[bmr, "RegionHoles" -> None]["Wireframe"]
The point I am trying to make is that you can decide if the inner region is to be excluded or not; in other words if it's a material region of an outside or just a curve the mesh should follow, because you need measurements along that curve.
