As we know, asteroids can be found in the Kuiper belt and Oort cloud, but surely the Sun only captures them, not produces them. I know that supernovae may produce heavy elements such as oxygen, silicon and iron, which is the common composition of asteroids, so is it true that asteroids are come from star remnants?
The asteroids (which are mostly found in the asteroid belt between Mars and Jupiter) and more distant, icy bodies found in the Kuiper belt and the Oort cloud were formed at the same time as the rest of the solar system.
The sun and the planets formed from a molecular cloud, containing mostly hydrogen and helium, but also some other elements that came from the remains of stars, including supernovae. This gas cloud collapsed under gravitation to form a star, surrounded by a disk of dust and gas. The matter in the disc formed the planets, and the Kuiper belt. More distant matter in an extended halo around the star, formed the the Oort cloud.
Thus the sun neither captures nor produces asteroids and other solar system bodies. They were formed at the same time as the Sun.
Note "Kuiper" not "Kepler" belt, and the Oort cloud is the source of comets, not asteroids. Asteroids are rocky; Oort cloud bodies are made of ices.
Astrophysicists classify stars into 3 "populations". Population (Pop) III is the oldest (first generation) and is the one which formed from the elements produced in the Big Bang (H & He (and traces of others notably Li)). Pop II stars formed from the molecular clouds produced by Pop III, and our Sun, a Pop I star, was produced in a molecular cloud from the Pop II and Pop III stars.
There's still a lot we don't know but we believe many Pop III stars were much larger than what is common today. Most of the heavier elements are not formed during a star's main sequence life-time, but are formed during eruptions and explosions which occur after a star has left the main sequence (during its "death" or old age). The length of a star's main sequence life-time is very sensitive to its mass; these Pop III stars lived fast and died young, spewing a lot of the metallic elements away into space. We have evidence that at least two or three supernovae contributed to the molecular cloud that the Sun formed in.
The Sun probably formed in a globular cluster (also known as a "stellar nursery") and the evolution of these is actively being studied. We believe a small part of our parent molecular cloud (maybe 1 thousandth or less) collapsed into our Solar System. We believe that our Solar System probably has hundreds or thousands of sibling stars, but only a few candidate "relatives" have been suggested/identified so far.
As the cloud collapsed due to it having a bit of excess mass density (compared to the cloud's average density), possibly due to stellar winds and supernovae shock waves compressing parts of the cloud, our protostellar disk formed. The heavier elements, including dust, due to the condensation, began to collide and form larger particles, these had increased gravity as well as larger size and tended to grow in size. Some became protoplanets, most never grew so large. Some of the protoplanets collided and broke apart, some of them coalesced into planets. What's left over from this is asteroids and comets and of course a lot of dust.
The more volatile elements and the smaller particles tend to be driven away from the Sun, both due to radiation pressure as well as due to the Solar Wind. The Asteroid Belt is believed to be the result of the failure of protoplanetary material to coalesce, because of the way Jupiter disturbed that region of space, but our study of the thousands of exo-planets is challenging some of what we believed were our most likely models of stellar system development and the story is far from settled.