So I was reading a Scientific American article about how the universe is spreading apart and how it is getting faster. But in the article there was something that baffled be and it was this "Sound waves emitted in the early universe traveled through space at near the speed of light until the cosmos had cooled enough for atoms to form." So how would this work? now I am obviously not an expert at physics but I know that sound is a mechanical wave so it needs a medium to travel through so why could it travel before a medium existed.
There were certainly no sound waves before the universe began. The article was talking about a period of time after the big bang during which the "stuff" in the universe was so hot that no atoms were stable, so atoms made of protons, electrons, and neutrons broke into their component parts almost immediately even if any happened to be created. No atoms $\neq$ no universe.
Why does heat mean that atoms can't form? Because there is an energy that it takes to keep particles together in an atom. High temperature means that particles have high kinetic energy. If the kinetic energies of the constituent particles are extremely large, they will easily break free of the "bonds" which hold them.
If you'd like to learn more about this, look up what a "quark-gluon plasma" is. That is the material which the "stuff" at the beginning of the universe was made of.