> like if taller buildings always need more shafts or something
The dependence is on keeping wait times reasonable. Taller buildings mean each shaft's elevator spends more time travelling, i.e. less time being available.
At this point you start doing locals (multiple elevators per shaft traversing only a subset of the entire building) and express (elevators skipping floors, usually between ground floors and various "sky lobbies" at 30~40 floors interval).
There's also a weight issue. The longer the shaft, the longer and heavier the cable must be, and the more tension and stretch. In some buildings, there may also be structural issues militating against an open shaft running the entire heightof the buldng.
The dependence is on keeping wait times reasonable. Taller buildings mean each shaft's elevator spends more time travelling, i.e. less time being available.