To move an object along a curve, you can use a Follow Path Constraint on the deformed object:
But first, you may need to make sure your follower object and curve have their origin aligned, otherwise there will be an offset between them and the deformations might not be as expected. Though this can be use for intended effects too.
As for the Follow Path constraint, you can either do this manually by selecting the follower object, add the Follow Path, set the target and hit Animate Path, or you can just select your follower object, then your curve and hit ⎈ CtrlP → Set Parent to Path Constraint
This will set the constraint for you, with the target and the animation.
The only thing you may need is to set the Forward and Up axes, which totally depends the context. If you don't know what to use, set your transform orientation to Local, select your follower object with the Move active tool enabled and see which axes you need: