|Marriage records, primary source for the marriage fact|
but a secondary source for the birth fact.
A secondary source can also be a document in which the informant is someone other than the individual that the document is about, particularly when it comes to information which is not really a time sensitive event, such as the names of a person's parents. A death certificate is a primary source for the death event in the sense that it is recorded at the time of the death, but can also be considered a secondary source considering all the information on it is supplied usually by a near relative of the deceased and/or a doctor/medical examiner. For example, a widow who never met her deceased husband's parents may provide their names incorrectly on the death certificate because she is a secondary source for that information. So with death records, it's especially important to examine who supplied the information and assess how reliable they might have been. Take into consideration that grief can confuse people and even close relatives can be estranged for so long that they don't know many of the facts of the deceased's life.
The other half of assessing a document's accuracy is understanding why and how it was recorded. Census records, for example, are frequently misunderstood by beginners to genealogy. I think in today's world, there is a common belief that any sort of government document is 100% accurate but that is certainly not the case. They're likely more accurate now than they were in history, because our record keeping has become more efficient, but even census records today are taken for demographic purposes, not identification. This means that it is not as crucial for many of the personal details filled out to be totally accurate. In the past, when censuses were taken by enumerators going door-to-door, this was especially true since there was more room for error, census records are like secondary sources twice over. The enumerator might have misheard or misunderstood the informant and don't dismiss the possibility that the informant themselves might have provided the wrong information. Generally, one person provided the information for everyone in the household, making them a secondary source for everyone but themselves. They might have been an in-law or youngster who wasn't confident about exact birth dates or locations, or a forgetful grandparent. If no one was home when the enumerator knocked on the door, they were supposed to return to the address later, but sometimes it was all they could do to simply ask a neighbor for your ancestor's details. Names and spellings weren't of the highest priority and I've even seen genders recorded inaccurately. Many censuses didn't even record a birth year or date, only the age of the individual and so naturally, this means that birth years calculated from an age are commonly out by a year or two. So everything on a census document should be taken with a grain of salt (except perhaps the date and location where the census was taken). This doesn't mean you should discount census data, but until you can confirm it with other, more reliable sources, keep in mind that the information from it might be subject to change at some point down the line. Birth years from census records should be input into your tree with "abt." (about) in front of them so you know it's approximate. Same goes for immigration dates, marriage years, etc. The census is a secondary source for all of these types of facts, except maybe if the event occurred immediately preceding the census.
Lastly, don't dismiss the possibility that an individual doesn't even know certain details about themselves, like when or where they were born, especially if they were born before the government began issuing official birth certificates. I know this seems impossible by our standards - how can someone not know when or where they were born? Didn't they celebrate their birthday? It's possible they did not. While birthday parties and birthday gift giving became popular in the 19th century, many poorer folk may not have been able to celebrate a birthday like we do today and certain cultures may not have participated. In any case, if an individual did not even know when or where they were born, naturally, recording these details in secondary documents would have been problematic and therefore they may vary on different records. This is why primary sources are so important.