If you go back far enough to the beginnings, it appears that the universe and all that is in it came into being at a particular point in time called the Big Bang.
How that came about nobody knows. Our current physcial laws only work to within a fraction of a second after Big Bang, and so we cannot as yet say anything meaningful about the universe before that, including the origin. It may be that any physical law that we ever come up with will always be limited to some fraction of a second after Big Bang, so we may never know how the universe, and all that is in it, came to be. Or, we may derive physical laws that allows us to say what happened right up to Big Bang, but because all of our experiments must be done at finite temperatures and densities, we will never be able to truly test the theories validity to the Big Bang. Plus, although the physical laws may tell us what happened
immediately after Big Bang, they may give no clue as to the actual origin "event".
So, we don't know. We may never know. Or, we may know someday.