Gold isn't created in Sun’s core. Conditions aren't extreme enough.
It has a more violent origin— created when two neutron stars collide.
Neutron stars are insane. Masses greater than Sun, squeezed to the size of a small city, with gravity hundreds of billions of times stronger than Earth.
But when two of them collide, what happens literally outshines the entire observable universe for a fraction of second.
They make ripples in space time, like a bell makes ripples in air. Energy is released in form of these ripples, with a peak power of 10⁵⁴ to 10⁵⁶ watts. (That's not a typo.)
That's 10,000 times more energy output that every single star in the observable universe combined, which is 10⁵⁰ watts.
The collision also creates a kilonova— an explosion which outshines the entire galaxy for weeks. Gold and other heavier elements like platinum and uranium are spread out by this explosion.
Over 100 Earth-masses of gold is created in a single neutron star merger.
There's no happy ending. Most of the times the merger creates a black hole 🕳️, which eats everything that's left
