How Can We Establish Precisely What Earth's Core is Made Of?
We know the density of the core from seismology.
We also know the density of pure iron at given pressure (P) and temperature (T).
From these two, people have long noticed that there is a discrepancy: the actual core is lighter than a theoretical core made of pure iron. This is known as the Core Density Deficit (CDD). To explain this CDD, we need to add light elements in the core composition. There are many candidates, such as sulphur, carbon, silicon, oxygen, etc.

This is actually needed by geochemists, who try to relate the Earth's composition to that of chondrite. They find that the Bulk Silicate Earth (BSE = crust + mantle) is depleted in some elements compared to the chondritic reference, and have to invoke a hidden reservoir to explain this. For some elements, this reservoir could be the core.

To further constrain this, petrologists run some high-P/high-T experiments to see the behaviour of elements during the Earth differentiation. Some elements are said to be lithophile, meaning they will stay in the BSE, while other elements are considered siderophile, hence should have joined the metal phase during segregation of the core. The problem is that some experiments disagree with others, as the behaviour of a given element can change depending on the conditions. For instance, niobium and tantalum are considered lithophile, but can be siderophile in reduced conditions.

I'm afraid the bottom-line of all this is: there is no simple answer to this question...