Cosmologists, on the other hand, study the universe as a whole. They are interested in understanding how the universe came into being, how it has evolved over time, and what its ultimate fate will be. Cosmologists use a variety of tools to study the universe, including telescopes, satellites, and computer simulations.
In general, astronomers focus on studying objects in the universe, while cosmologists focus on studying the universe itself. However, there is some overlap between the two fields. For example, some astronomers study the formation and evolution of galaxies, while some cosmologists study the large-scale structure of the universe.
Ultimately, the difference between an astronomer and a cosmologist is a matter of focus. Astronomers are interested in studying the objects in the universe, while cosmologists are interested in studying the universe itself.