The exact cause of Narcissistic Personality Disorder has yet to be fully proven. Indeed, to the best of my knowledge, scientists aren't even specifically looking to find the cause of narcissistic personality disorder.
Having said that, they have considered it of course.
Originally the theory was that childhood abuse led to the narcissist being so ashamed of their real self, the one which deserved (in their mind) the abuse, that they submerged it so deep that it went away.
And so, because the real self was gone, they needed something, so they created a perfect False Self instead.
That False Self then had to be kept in place throughout the narcissist's whole life by huge effort and determination. The narcissists needed the False Self to be perfect (went the theory), and so one of their major jobs was to protect it against any suggestion, ever, that they were less than perfect.
This fact did explain things like gaslighting -- where the narcissist lies to you about what happened and distorts your reality, and invalidating -- where the narcissists totally dismisses your experiences, both of which activities the narcissist does so well.
This theory struggled, however, when they were presented with a narcissist who'd had an idyllic childhood. So they added to the theory saying that abuse could also be that the child was too adored and too privileged and indulged.
In this case it seemed that the child was never allowed to have their real, flawed, self. The parents instead created this perfect False Self, and the child needed to keep hold of that in order to be loved by them.
This however was pretty much just guesswork.
However, we now know that two of Narcissistic Personality Disorder's 'cousin' personality disorders, i.e. Borderline Personality Disorder, and Anti-Social Personality Disorder (aka Sociopathy), show real and measurable differences in the brains of those who have it. So, if this is so, those disorders at least seem to be integral rather than learned behaviour, unless abuse caused the brain changes.
Also, the fact that it seems to run in families makes me wonder if there's not a genetic predisposition. When I ran the DONM forum, so many times I heard of women who'd given their children perfectly normal loving childhoods, but the children still had Narcissistic Personality Disorder, which lends credibility to that theory too.
So, the short answer is that we don't know what is the cause of narcissistic personality disorder. Not yet.
And it's important to know the cause. Many daughters of narcissistic mothers have said to me that they want to know if it's their mother's fault, if it's something she can help doing or not.
In a way though, it doesn't matter I think. We don't have to identify why she's like this, to accept that she is, and to acknowledge that we deserve better.