Why does the Earth have an iron core and a silicate shell?

There are two independent assumptions explaining this structure of the Earth:
a) the Earth passed the stage of substance melting, during which the gravitational differentiation of the substance took place;
b) during the condensation of the protoplanetary cloud, fragments of nickel iron were first isolated, which were combined into compact masses; the silicate shell was formed later.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.