Yttrium is known to form two hydrides: YH 2 , a metal, and YH 3 , which is dielectric. However, the stability of YH 3 is not fully understood, especially in the context of thin films, where the yttrium layer must be coated to protect it from oxidation. In this work, we show that the stability of a YH 3 thin film depends on the capping layer material. Our investigation reveals that YH 3 appears to be stabilized by hydrogen that is adsorbed to the capping layer surface. This is evidenced by the YH 3-YH 2 transition temperature, which was found to be correlated with the desorption temperature of hydrogen from the surface. We posit that surface-adsorbed hydrogen prevents hydrogen from diffusing out of the thin film, which limits YH 3 dissociation to the solubility of hydrogen in the YH 2 /YH 3 thin film.