prevention?
you should be providing necessary levels of caclium and magnesium, 2 completely different molecules, to the plant at all times.
how much is in the soil? When does it run out? how do you ramp up to supplement this exhaustion of what came in your soil? These are all things you must learn through trial and error as there are so many variables that may differ from the products you are using to someone else's garden.
take notes... if you buy the same substrate or constitute it the same way, if custom built, you'll have a better idea of the timeline. You'll know when and how much to supplement without guessing within 1 or 2 grows if systematic about it.
the plant needs NPKCaMgS and macronutes at all times... it may need varying amounts of some depending on the stage of life, but at all times it needs at least some level of these necessary building blocks.. whehther it's terpene production of cell division. we know this because these atoms are required to build anything the plant creates... can't manifest 'elements' from nothing...
One note... Mg deficiencies take 30-35 days before you even see them after the point at which theplant is deficient. So, if oyu see Mg-deficiency, you know you needed to up the levels of Mg (calcium is not relevant in this case) 30-35 days ago. If Ca levels are good, Epsom salt (magnesium-sulfate) is 100% plant available once dissolved and another way to supply Mg without impacting Ca levels. It's good to have options until you find a good fertilizer mix to avoid nearly all problems. Fertilization should be easy and like clockwork... if not, keep adjusting until you get there. Most people have problems because they follow dogma and preconceived false notions.