Are math competitions important for becoming a doctor?

No.
Do them if you enjoy them.

What you should be doing in HS for a potential doctor:

  1. Take Bio, Chem, Physics and at least one AP version
  2. Challenge yourself in English…try to take AP if possible
  3. Try to get to Calculus
  4. Volunteer in a medical setting

if you are looking for BS/MD then also:
5) Try to do research
6) Shadow doctors