The pH modifies the bioavailability of the metals in the solution, due to the chemical speciation of the metals (nutrients) such as Zn, Ni, Cu etc. For example, alkaline pHs favor the generation of species that react with the ions present in the medium; generating more stable compounds (such as hydroxides) that can precipitate and in this way are no longer dissolved, which makes them less available to plants.
This is such a question that you browse this issue on any search engine, there will be pouring literature. An issue which makes the basis soil fertility and plant nutrition...
Soil pH of about 5.4 to 6.2 to is good for general farming. Of all nutrient, bio-availability P is severely affected when pH is out of the above range due Al fixation. That's why total nutrient does not make any difference if the soil pH is not in the appropriate range. Thank you.