Can you help with us program a shaft encoder on vexcode?

Like distance in a single direction? If so, my answer still stands, you can use the circumference and rotation to measure the distance the wheel has gone.

Pseudo code:

while (distance traveled is less than target)
{
get rotation;
convert rotation distance to inches using circumference;

drive forward
}
stop driving

If you are talking about odometry, also known as position tracking, that is a whole other slice of a whole other pie.

Odometry links

https://www.vexforum.com/t/where-to-start-with-position-tracking/77263/3

https://nickmertin.ca/Tracking.pdf