Yes, you should use a 12v starter on a 12v flywheel (which has 168 teeth) and a 6v starter on a 6v flywheel (which has 139 teeth).

Just to confuse you, it is possible to use a 6v starter on a 6v flywheel on an engine that was made for a 12v system. You may then run 12v to that 6v starter and the teeth will match/mesh fine (but you should keep your engine well-tuned so that it starts quickly).