It completely depends on the type of model, really.
For instance, the Falcon has no real interior detail. So, you paint the little cocpit, after you assemble it, build the rest of the kit and then paint the whole thing.
An X-Wing or TIE fighter, has a bit more involved interior, so, you asemble the cockpit, paint it, build the rest of the kit and then paint the remainder.
I build mostly aircraft, but I do dabble in armor, as well.
When building aircraft, you need to start on the inside first, painting as you build, otherwise, there's no way you'll be able to go back and paint, later.
Here's some example:
It would be absolutely impossible to paint those, after assembly.
But with armor, I leave off the small details, that would be painted a different color (tracks, tools and stowage) and paint them off-vehicle and attach afterwards.
It would be a royal pain to paint the base vehicle, then have to go back and paint, detail and weather things like the tools and stowage and especially things like missiles.
Figuring these things out, comes with years of practice. It's a lot of trial and error, before you start to figure out the process.
The next dilema that comes is: "do I paint this part while it's still on the sprue, or do I cut and clean it, first?". Leaving it on the sprue, makes it easier to handle, but then you have to clean up the sprue stub and touch-up the paint. Clipping it and cleaning it, makes it easier to paint in one shot, but harder to handle, while painting.
It's all trial and error.
-Fred