My suggestion would be to keep good notes.
There are lots of apps for logging parameters. Google sheets works fine for me. The charts are really helpful.
Alk, Calc, Magnesium is more straightforward. Test routinely, refine your dosing.
Nitrate and phosphate is more of an art and highly dependent on how you choose to filter and export.
Careful notes are so important because you often won't see the impact of any change for days... usually weeks, especially with subtle changes like how long you skim for or how long you keep a refugium lit. When you see a trend, you can backtrack and find the likely cause in your logs.
Most of my "uncontrolled" swings have been the result of a bad batch of salt or a bad test kit, coupled with my need to fix everything right away. Bad salt or bad test shows a odd result, I correct (or overcorrect) in the opposite direction, increasing the overall swing. Basically, never trust your salt or your tests.. lol.
I generally always run two brands of alkalinity test. Make the tank show you a trend and confirm the trend with a backup kit or an lfs test before considering a major corrective action.
Last, use a salt that has the parameters you want to keep, or use a low-level salt and boost up the parameters to where you want them in your bin before using it. In any emergency, the first advise is a water change... often up to 50%. If you're using a salt with 12dkh and 480 calcium, but you keep your reef at 9dkh and 420, the "cure" will always come with a parameter shock.
It also makes calculating maintenance doses for the major elements more difficult.