If you want to make absolutely sure it’s scaling in the axes you want, you can constrain it by Shift + the axis you do not want to scale in, e.g. if I want to scale in XY and not Z, I would press S and then Shift + Z. It also works for the other transforms, too.