Apologies for the misunderstandings. I see now from the modified question that it's specifically the spelling variations you're concerned about.
I think searching for a "real" surname could be a fruitless quest. Some spelling variation will certainly be the product of errors (e.g. illiteracy, recording what was heard, and transcription errors) but some will be deliberate.
My own surname was once spelled consistently as "Procter" in my home town. Somewhere around 1850, the family obviously took the decision to change the spelling as it was just as consistently "Proctor" thereafter.
It's not just surnames too. A case I'm actually working on at the moment concerns someone whose middle name mysteriously changed from "Kindle" to "Kenyon". Since I only have one item of evidence for each alternative, although several items with a middle initial of "K", then I can't say whether either one was an error. I have a strong case for the middle name at baptism (Kindle) being based on the surname of the father as she was illegitimate and there was someone with this rare surname on the same street at the same time. The middle name at marriage (Kenyon) may have been an error (did she not remember her real middle name?) or it could have been deliberate (maybe she wanted to break any connection to her biological father).
In situations of variant names, it's always good to record the evidence verbatim against each cited source. In a good software product, the details of the relevant person will accommodate alternative names. So, the essence of your question is when to copy those variations in the evidence to the accepted alternative names for a person. This has to be on a case-by-case basis. Sometimes it is obviously an error but sometimes it's not an error, and sometimes you may not be certain as in my case above.