If you are talking about the Town Vital ~Records~ Collection of images, they are the actual Town Records made by the Town Clerks, fairly contemporaneously, most now held by the Massachusetts State Archive.
"I'm curious because I found my relative Danniel Cooley in this collection . . ."
If you mean you found a person by the same name, that is one thing.
Proving that the person in a record in place A, date X is the same one as a person by the same name in place B, date Y, takes connective **evidence**. Such connective evidence could be a deed where John Doe and Cunigunda his wife, of B, sell their land in A. Or John Doe of B made a will bequeathing his land specifically described as being "in A" to a child. These are two of many possibilities requiring detailed research in local records.
"Same name = same person" is the most common genealogical mistake (same surname = same family is next most common).