Let's see, if you grow with soil as a substrate, the pH range should be higher than in hydroponics. In soil, the pH should vary between 6 and 7. It's advisable that in the first weeks of growth, it approaches around the value of 6.20, while when flowering begins, it should gradually change to achieve values of 6.80, since the concentration of nutrients supplied is different and each nutrient has its optimal absorption at a certain pH.
On the other hand, if you do foliar feeding, spraying water on the leaves, the pH should be around 7 to 7.5, since the leaves absorb nutrients better at this pH (they function differently than the roots).
I hope this helps :)