Astronomy is the study of everything in the universe. Astronomy includes determining the nature of things on a small scale, such as the composition and evolution of individual stars, planets and interstellar gas, building to include the makeup of galaxies and galaxy clusters, and finally to understanding things on the largest scale. This is where cosmology comes in. Cosmology is a subsection of astronomy and deals with the nature of the universe itself: its beginnings in the Big Bang, its early history, its current state, and its eventual end.
Credit: Astronomy vs. Cosmology19