Robot Autonomous Not Move Robot

One way to do this is to use methods. Basically, a certain line of code can be called and given parameters. (The competition template uses this) This way you can have those loops executing while your robot drives.
this and this should help understand methods.

The basic pseudocode our team uses is as follows

 driveFunction(int target)
{
while(robot has not reached it's target)
{
Your PID/odometry stuff here
}
}

This method will be running the entire movement, and then stop once the robot has hit it’s target, letting you call another movement. So your drive code would look like

drive(your target here)
drive(another target here)

and so on.

I don’t blame you if you are extremely confused, but there are a lot of other tutorials about this kind of thing on the forums and on youtube. The one that I used to learn this concept is here, but there are other good ones as well.

In regards to your second question, I’m guessing your asking whether it’s worth having an external encoder wheel, versus using motor.position(). In general, an external encoder is considered more accurate, but we use the internal motor encoders and it works fine with no extra building needed.

I hope this helps.