The sudden decrease in molar volume exhibited by most lanthanides under high pressure is often attributed to changes in the degree of localization of their 4f-electrons. We give evidence, based on electrical resistivity measurements of dilute Y(Gd) and Y(Tb) alloys to 120 GPa, that the volume collapse transitions in Gd and Tb metals have different origins, despite their being neighbors in the periodic table. Remarkably, the change under pressure in the magnetic state of isolated Pr or Tb impurity ions in the nonmagnetic Y host appears to closely mirror corresponding changes in pure Pr or Tb metals. The collapse in Tb appears to be driven by an enhanced negative exchange interaction between 4f and conduction electrons under pressure (Kondo resonance) which, in the case of Y(Tb), dramatically alters the superconducting properties of the Y host, much like previously found for Y(Pr). In Gd our resistivity measurements suggest that a Kondo resonance is not the main driver for its volume collapse. X-ray absorption and emission spectroscopies clearly show that 4f local moments remain largely intact across both volume collapse transitions ruling out 4f band formation (delocalization) and valence transition models as possible drivers. The results highlight the richness of behavior behind the volume collapse transition in lanthanides and demonstrate the stability of the 4f level against band formation to extreme pressure.