The atoms inside the core of sun are continuously fusing and forming other atoms. Can this continuous fusing make gold atoms?
Gold is heavier (further down the periodic table of elements, not necessarily more dense, although this is also the case) than iron. Iron's elemental number is 26. Gold is 79.
Any star that attempts to fuse iron will go into a supernova phase.
At that point, gold and all of the elements heavier than iron will be created, but only in the brief moments while the star is tearing itself apart.
No star can ever create gold in any circumstances other than during a supernova. Our own sun is not nearly large enough to go supernova.
Any supernova will create gold, not just the type of supernova described above.
More reading: https://en.wikipedia.org/wiki/Type_II_supernova
Carl Sagan answers this in the Cosmos series. Here is an excerpt.
The matter in the known Universe is made up of 74% Hydrogen. In most of the stars we see, hydrogen nuclei are being jammed together to form helium nuclei. Every time a nucleus of helium is made, a photon of light is generated. This is why the stars shine. Helium accounts for 24% of matter in known Universe. In fact, helium was detected on the sun before it was ever found on the Earth. These two elements have accounted for 98% of matter. Might the other chemical elements have somehow evolved from hydrogen and helium?
Three units, put together in different patterns make, essentially, everything – “Neutron, Proton and Electron”. If you’re an atom and you have just one proton you’re hydrogen. Two protons, helium. And so on. Protons have positive electrical charges. But since like charges repel each other, why does the nucleus hold together? Why don’t the electrical repulsion of the protons make the nucleus fly to pieces? Because there’s another force in nature. Not electricity, not gravity. The nuclear force!! We can think of it as short-range hooks which start working when protons or neutrons are brought very close together.The nuclear force can overcome the electrical repulsion of the protons.
A lump of two protons and two neutrons is the nucleus of a helium atom and is very stable. Three helium nuclei, stuck together by nuclear forces makes carbon. Four helium nuclei makes oxygen. There’s no difference between four helium nuclei stuck together by nuclear forces and the oxygen nucleus. They’re the same thing.
How easy is that to fuse nuclei? To avoid the electrical repulsion protons and neutrons must be brought very close together so the hooks which represent nuclear forces are engaged. This happens only at very high temperatures, where particles move so fast that there’s no time for electrical repulsion to act. Temperatures of tens of millions of degrees. Such high temperatures are common in nature. Where? In the insides of the stars. Atoms are made in the insides of stars.
It is possible to make atoms with up to 26 Protons [Iron] in a Star. Above that, We need a supernova to create atoms with 30 protons, 40 protons, 50 protons or even 60 protons. Nature prefers ‘even’ numbers for stability. But ‘Gold’ is an odd-numbered atom. It has 79 Protons. It needs more than a super nova for its creation. It needs 2 Neutron stars to collide directly. This collision alone can favor the creation of stable atoms of Gold.
Since neutron star collisions are also suggested as the origin of short duration gamma-ray bursts, it is possible that you already own a souvenir from one of the most powerful explosions in the universe.
Except for hydrogen and helium every atom in the sun and the Earth was synthesized in other stars. The silicon in the rocks, the oxygen in the air, the carbon in our DNA, the gold in our banks, the uranium in our arsenals were all made thousands of light-years away and billions of years ago. Our planet, our society and we ourselves are built of “star stuff“.
Per the beginning of @RobJeffries' excellent answer to Are binary neutron star mergers needed to explain the abundance of gold?:
The creation of some very heavy neutron-rich elements, like gold and platinum, requires the rapid capture of neutrons. This will only occur in dense, explosive conditions where the density of free neutrons is large. For a long time, the competing theories and sites for the r-process have been inside core-collapse supernovae and during the merger of neutron stars.
My understanding is that it has become increasingly difficult for supernovae to produce (in theoretical models) sufficient r-process elements to match both the quantity and detailed abundance ratios of r-process elements in the solar system (see for example Wanajo et al. 2011; Arcones & Thielmann 2012). The conditions required, particularly a very neutron-rich environment in the neutrino-driven winds, are just not present without the fine tuning of parameters (see below).
Instead, the models invoking neutron star mergers are much more robust to theoretical uncertainties and successfully produce r-process elements. The question mark appears to be only over their frequency at various times in the evolution of a galaxy and exactly how much enriched material is ejected.
This kind of environment has never existed and will not ever exist in the Sun's lifetime based on a pretty solid understanding of stellar evolution.