Do stars have hydrogen and helium or hydrogen alone on its birth?
All stars are composed of hydrogen and helium, and depending on age and generation, they may have varying amounts of heavier elements.
According to the big bang theory, when the universe cooled enough for atoms to combine, about 75% of the mass of the universe was hydrogen, 25% was helium, and then there were trace amounts of lithium. This was the concentration of matter that formed the very first stars in the universe, and it has not changed much since then.
Hydrogen is the easiest element to fuse since it requires the least amount of energy to overcome coulomb repulsion. That's why all stars begin by fusion hydrogen into helium, and spend most if not all of their life doing so. More massive stars will also create heavier nuclei inside their cores, so as the concentration of hydrogen goes down, the concentration of heavier elements increases.
When stars die, they scatter their atoms back into space, and new stars are made of those atoms. Therefore, over time, new stars will have greater and greater compositions of heavier elements. We call this composition, metallicity.
The Sun, which is considered to be metal rich, has a metallicity of .02, meaning that only 2% of the mass of the sun is not hydrogen or helium. So the composition of stars is still almost entirely hydrogen and helium.