The universe is everything that exists - all space, time, matter, and energy. A galaxy is a massive collection of stars, planets, gas, and dust bound together by gravity. So, while the universe contains everything, a galaxy is just one of the many vast collections of objects within it.