what metals does it contain?
UNANSWERABLE
how does a white dwarf form? After the hydrogen-fusing period of a main-sequence star of low or medium mass ends, such a star will expand to a red giant. It the red giant  has insufficient mass to generate the core temperatures required to fuse carbon it forms a planetary nebula. The remaining core is the white dwarf.
wiki:19666757
White dwarf [SEP] Introduction
A white dwarf, also called a degenerate dwarf, is a stellar core remnant composed mostly of electron-degenerate matter. A white dwarf is very dense: its mass is comparable to that of the Sun, while its volume is comparable to that of Earth. A white dwarf's faint luminosity comes from the emission of stored thermal energy; no fusion takes place in a white dwarf. The nearest known white dwarf is Sirius B, at 8.6 light years, the smaller component of the Sirius binary star. There are currently thought to be eight white dwarfs among the hundred star systems nearest the Sun.