How the Curve modifier works
Hopefully this is not too confusing - it's just a quick overview of the problems with placing objects correctly to deform along a curve. Maybe someone might be able to explain it better. For a basic understanding I intentionally left out more complicated things like different rotations or scale of the objects.
I use a simple geometry like a long cuboid which is subdivided very often in X direction (because it's the default deformation axis when adding the Curve modifier), so it can follow the curve more smoothly. I take a simple Bézier curve as the target.
In the first example, both objects have their origin in the same location, furthermore the curve's first vertex is placed at the origin and the cuboid has its origin to the left so that all geometry is lying in +X direction.

If I now put the Curve modifier on the cuboid and select the Bézier curve, it works pretty much as expected: the cuboid gets deformed along its X, starting at the beginning of the curve.

A different thing happens if the geometry of the cuboid is centered around the origin like in the following example:

Although the curve and cuboid still have their origins in the same location, only the right side of the cuboid gets deformed. Everything left of the origin (with X < 0) is just aligned in the direction of the curve's first vertex tangent.

Now when the origin in the center of the cuboid means that it is extended to the left or "before" the curve's origin, this might seem like extending the curve in this direction might help. So let's say I add a vertex to the curve on the left side:

But instead of just having the cuboid deform in both directions it has moved further down the curve to the left. And here is the reason: Are both objects with their origins in the same location, the deformation starts with the object's geometry offset from its origin to the first vertex of the curve.

So the simplest thing to deform an object exactly along the curve is moving them both to the same location, with the deforming object's geometry "beginning" at the origin, not centered.
These were all examples where cuboid and curve are in the same location. What happens if they are not? In the next example, the cuboid is moved 3 m in +Y direction:

The cuboid is now deformed along the curve with an offset of 3 m perpendicular to the curve's tangent (because +Y is to the "left" of the X deformation axis). The same thing would happen if you moved the cuboid's mesh in +Y direction in Edit Mode and leave the origin where the curve is.
