It is a matter of how you want to operate your process. I do mostly full volume BIAB but when I do use a sparge, I add all the water into my Anvil and treat all the water. Then I draw off what is needed for the sparge.
If you are using a HLT and fill it with all the water you need, it may be easiest to add all the water agents directly to the HLT as you are filling it to allow the salts to fully dissolve.
Other brewers I know treat the water just before mashing in. One adds all the salts into the mash and does not treat the sparge water at all.
So the choices are yours and there is no right or wrong way. Just do it consistently each time and make it part of your brewing routine.