You are neglecting two important facts.
The first one is that stars, toward the end of their lives, return to the interstellar medium (ISM) a lot of their initial mass, but now enriched with heavy elements produced by nuclear reactions inside the stars themselves.
In this way, younger stars which form from the ISM begin their life with a larger fraction of heavy elements than old stars, which formed earlier when the ISM was less enriched than it is today.
Most stars return a lot of material to the ISM, with the only exception of very low mass stars. This occurs in different ways, depending on the star mass.
Stars heavier than $8 M_\odot$ (that's eight times the Sun) first lose mass through powerful winds (in the most extreme cases, the so-called Mira variables, a heavy star can throw away 90% of its mass), then with SN explosions.
Stars lighter than $8 M_\odot$ do not experience SN explosions, and undergo lower rates of mass loss, but they still lose much mass.
Stars roughly the mass of the Sun also lose mass, in much less powerful winds or in the so-called Planetary Nebula phase, on their way to becoming a small white dwarf. The PN ejections are rich in CNO, as shown by the fantastic colors of their surroundings.
Lastly, stars considerably lighter than the Sun shed little or no mass.
Keep in mind that all of these episodes of mass loss occur when the star is old, i.e. when most material has gone through one stage of nuclear burning (H-> He) or maybe even more (He-> C,N,O, CNO-> Fe,Mn,Mg,...), so that the material returned to the gaseous phase (the ISM) is much richer in heavy elements than that from which the star formed.
There is a second fact to keep in mind. Since large stars burn nuclear fuel much faster than low-mass stars (there is an approximate law $L \propto M^4$ relating luminosity to star mass), large stars live very little, a few million years, while low-mass stars formed shortly after the big bang are still here. So, when you are talking about PopII stars, those are old: they formed a long time ago (from 12 to 7 billion years ago in our Galaxy); instead, PopI stars are either intermediate in age (like the Sun, 4.5 GYr old) to very young (even just 1 Million years ago!).
What this means is that, with PopII stars you are seeing stars that burn nuclear fuel very slowly, and formed when the ISM had not yet been enriched by the recycling of stellar material. With PopI stars you see instead stars which both formed recently, from an enriched ISM, and which bring to the surface the products of their own nuclear burning. Both effects make PopI stars much richer in heavy elements than PopII stars.
Best Answer
I have a feeling this has been answered before, but basically it is because H and He dominate the elemental abundances in the universe. When we look at what else there is we are guided by the elements we can ascertain are present in the photospheres of stars. It just so happens that the most prominent signatures (the Fraunhofer absorption lines) are those due to atomic and ionic absorption features due to calcium, iron, sodium, magnesium, nickel and aluminium - i.e. "metals".
This is ironic(!), because actually, after H and He, the most abundant elements in the universe are oxygen, nitrogen and carbon (i.e. non-metals); but their signatures in the optical spectrum of stars are comparatively weak. As a result, astronomers lazily refer to anything heavier than helium as "metals" and there is little motivation to change this nomenclature since there is an orders of magnitude gap between the abundance of helium and the abundance of the C, N, O etc. in the universe.
In recent times the term "metals", or "metallicity" has become less useful, because it has been found that the abundance of the heavier elements do not all scale in the same way. Some stars are comparatively rich in O, Mg, Si (the so-called "alpha elements" that are formed by the capture of He nuclei), or in s- or r-process elements that are formed by neutron capture, or have other abundance peciuliarities in one or more elements. For example, older stars born within a billion years of the formation of our Galaxy tend to have a higher $\alpha$-element/Fe ratio than stars being born today, even though their iron abundance is very low. It has become far more important to say exactly what you mean by "metallicity" and I would say the default now is to assume that, in the absence of any other stated definition, "metallicity" refers to the relative abundance of iron-peak elements (Mn, Fe, Ni, Co).