This contrasts with ordinary gas giants such as Jupiter and Saturn, whose atmospheres consist primarily of hydrogen, with helium as a secondary component only.
The star will drive off lighter gases more effectively through evaporation than heavier gasses, and over time deplete the hydrogen, leaving a greater proportion of helium behind.
Such a process will take some time to stabilize and completely drive out all the hydrogen, perhaps on the order of 10 billion years, depending on the precise physical conditions and the nature of the planet and the star.
On ice giants, methane naturally forms a cycle of melting, evaporation, breakdown and subsequent recombination and condensation.
One scenario involves an AM CVn type of symbiotic binary star composed of two helium-core white dwarfs surrounded by a circumbinary helium accretion disk formed during mass transfer from the less massive to the more massive white dwarf.