The current through the resistor is, by KVL and Ohm's law:
\$\dfrac{V_{IN} - V_Z}{R_S}\$
This is the maximum current through the zener diode and so, \$R_S\$ is chosen to limit the current through the diode to some value such that the maximum power dissipated by the diode is below the maximum power rating.
For example, if the Zener is 12V, 1W device, we would want the maximum zener current to be less than \$\dfrac{1}{12}A \$.
From a comment to another answer:
can we select any zener at a voltage, without looking at the maximum
current?
The point of Jim's answer, and mine, is to emphasize the power dissipation associated with the zener diode.
Since our answers are evidently not sufficient in this regard, consider the following excerpt from a zener diode data sheet:

Note the first entry is the absolute maximum power dissipation. In this case, \$P_D = 500mW\$.
So, if you pick a zener diode from this family with a zener voltage of \$V_Z \$, you must pick a resistor to limit the maximum current to be (perhaps considerably) less than:
\$I_{Z_{max}} < \dfrac{P_D}{V_Z}\$
For example, if you pick the 1N5231B with a nominal \$V_Z = 5.1V\$, you must choose a resistor such that
\$I_{Z_{max}} < \dfrac{0.5W}{5.1V} = 98 mA \$