Maybe God makes us sick because he wants us to go to the doctor? Or pray? It is hard to guess what God wants for us.
What we know is that Rashi (on Bava Kama 85a) answers your question explaining the verse "And heal, he shall heal" to mean we should **not say that we cannot presume to heal someone since God caused him to be sick.
The Rambam (in Deot 4:23) writes clearly that a talmid chacham should not live in a city without a doctor.
Arie Pelta here also writes
In Sefer Devarim, the Zohar (Haazinu 299a) states, “one should not say
since G-d imprisoned, one should not try and release him”. Even though
G-d had imprisoned the sick man, nevertheless, one should try to free
him. If the doctor can cure his physical illness, good. If not, the
doctor should try to bring him to repent from his sins and cure his
soul.
To take the counterpoint, the Ramban writes (Vayikra 26:11 towards the end), as in your question, that sick people should turn to God and not doctors to heal them. How can it be knowing the Ramban was also a doctor? There are a number of explanations, e.g., the Ramban speaks of a utopian society (artscroll on Brachot 60a), or he speaks of "hidden diseases" (e.g., psychological) which in his time were not healable as of today (Ibn Ezra, see also here for more on this Ramban).
In any case, the halacha (Birkei Yosef on YD 336:2) says clearly one cannot rely on miracles and should go to doctors. See also here regarding another Ramban forcing someone with a life-threatening condition to ask others to desecrate Shabbat to save his life.
For more see here and there.