Your body has hydrogen and heavier elements.
Most hydrogen in your body (really most of it) is primitive hydrogen from the origins of the Universe. Same would happen for Helium but we don't have it (almost none) on our bodies.
For all other elements, yes, they come (really most of them) from a star.
Sequence is approximately as follows:
When the Universe was young, our Galaxy was young: it was a cloud made of Hydrogen and Helium. Then, some stars (called Population III stars) were born and started burning hydrogen into helium, and on the latter stages of their lives they burned up helium into weighter elements like carbon, nitrogen, up to very small amounts of iron (the most stable element), and beyond that up to uranium.
Depending on their mass, of course. The smaller of these stars may be still around us, and the bigger ones exploded, sending these new elements to the galactic (a.k.a. interstellar) medium.
Then, from the now enriched medium, new stars were born (called Pupulation II stars). These ones had of course a lot of hydrogen and helium, but they had also some of the heavier elements. In turn, some of them are still observable (smaller ones, which last longer) and some of them exploded (bigger ones, which burn faster).
This second wave of stellar explosions enriched more the interstellar medium (gallactic medium) so a new generation of stars could be born. These are known as Pupullation I stars. Our Sun is one of them.
But not all the mass of the cloud which formed our Sun went into the Sun. Some if it made up the planets, and thus, ourselves.
So the atoms on our bodies come from the pre-planetary cloud, which consisted in original hydrogen enriched by Popullation III and Popullation II explosions.
Please note: due to chemical reactions, electrons in the atoms do not need to be the same they were while they were ejected by the stars, but the nucleus are.