I’ve used various gearmotors from
All Electronics. Assuming O-gauge, I’d figure $10-20. For a one-off, I’ve found larger shafts (e.g., ¼” round or flatted) are easier to deal with such as fabricating a coupler to the wheel without a machine shop. Smaller motor mounting faces can have difficult to find machine-screw threads (metric).
Unless manually operated, consider a trolley out-and-back module. Using a limit switch at each end, the circuit applies lift voltage until the car hits the top switch, waits, then reverses voltage to drop until the car hits the bottom switch, repeats. Most can ramp the voltage so riders don’t get whiplash.