To clear up the definition first: to say that $S^*$ is "optimal for men" means that in $S^*$, every man is paired with the best possible woman he can possibly be with among all stable pairings. There is nothing vague about it.
Now to address your point. "Two lines above", we were talking about the pairing $S^*$, the pairing produced by the Gale-Shapley algorithm. At "Let B be partner of Z in S", we are talking about a hypothetical stable pairing $S$ in which $Y$ is paired with someone better than he is paired with in $S^*$.