Materials separate by MACROSCOPIC density. However, heavy elements can be chemically bound in light materials. Uranium, for example, is highly concentrated in the Earth's crust compared to the mantle.
Gold is a siderophile element, chemically favoring to bind with iron metal, and preferentially went into the Earth's iron core when the planet differentiated.
This is why mining asteroids for siderophiles (like gold, but also platinum group elements) has been a staple of space advocacy.
I didn't know that fact about U, thanks.