The primary way in which we learn about the history of life on earth is through Fossil records.
Fossil records are the one of the only things that allow us to study and examine things that have been long gone. They're crucial for the study of life on Earth. There are many other ways and tools we can use to study life on Earth, but it's impossible not to mention fossil records.