Why does gold and other metals conglomerate
Some things to consider. Even if elements are formed randomly in stars that does not necessarily imply that the elements will be distributed evenly and randomly when the star explodes. Following the explosion of a star there will be a gravitational attraction between the elements created within the star which will cause clumping/agglomeration of the elements.

The other thing to consider is chemical attraction due to ionic charges and the lack or excess of electrons in the outer shells of atoms which causes atoms to chemically combine with other atoms to form molecules.

Many elements and molecules are soluble in water. When conditions change, such as temperature, pressure or chemical attraction, metals can precipitate out of solution and collect en-mass, sometimes forming nuggets.