Muscle grows across a wide range, roughly 5 to 30 reps, provided the sets are taken close to failure. Moderate ranges of about 6 to 15 reps are popular because they balance mechanical tension against fatigue and time.
The growth signal depends mainly on how much tension the muscle experiences on the hard reps of a set, not on the number written in your log. A set of 25 taken to genuine failure produces high tension on the final reps as the muscle fatigues and recruits its higher-threshold motor units. A heavy set of 5 reaches high tension immediately. Both routes work; they simply arrive by different paths.
Heavy compound movements such as back squats suit the lower end, where technique is easier to hold and the fatigue is manageable. Isolation and machine work such as calf raises or leg curls suit the higher end, where the load is low and failure is safe.
Proximity to failure and total hard sets matter more than the specific range. Someone doing 12 hard sets in the 8 to 12 range and someone doing 12 hard sets in the 5 to 8 range will end up in a similar place, provided both progress over time.
Use 5 to 8 reps on your main compound lifts, 8 to 12 on secondary compounds, and 12 to 20 on isolation work. Progress within each range before adding load. This covers the whole spectrum and keeps the joints happy. See Hypertrophy and Muscle Growth for the underlying mechanisms.