This problem is caused by wrong pH from the medium and a nutrient lockout because of that. The issue with cannabis plants is that they are only able to take up nutrients within a small pH window, which ranges from about 6–7 when growing in soil. If the pH is lower or higher than that, the plant cannot take in nutrients, even if they are present—thus spurring nutrient deficiencies via "nutrient lockout".
You need to flush the soil. Just follow these steps.
https://www.royalqueenseeds.com/blog-how-and-when-to-flush-marijuana-plants-n312