There is no set answer to this question. Taking all your prerequisite classes prior to the MCAT is definitely an advantage because then most of the material on the MCAT will be review. Nevertheless, you can learn the material fresh through a MCAT course or by self-studying. It is your preference, but MCAT takers typically take the MCAT after they finish the MCAT prerequisites.
Related article:
MCAT Facts || Is there a standardized test that is required?