The advantages for girls begin even before birth, and like so many other differences between the sexes may be tied to hormones.
For example, significantly more male fetuses are spontaneously aborted or stillborn.
The reasons need more investigation, but they seem to include sex differences in chromosomal structures and possibly a slower maturing of boys’ lungs because of the effects of testosterone. In most societies this pattern of excess male mortality continues for the first six months.
An inborn biological advantage may persist at least until menopause because premenopausal hormones like estrogen offer some protection from heart disease caused by damage that narrows blood vessels.
The advantages may also include differences in susceptibilities and immunities to some disease-causing organisms. Still, some diseases are more likely to sicken and kill women.