She was nineteen. She was living as married, but her partner was already married to someone else—and as it was 1816, he certainly wouldn’t be getting a divorce. Tradition claims she first had sex with him basically on the grave of her mother, who had died when she was born. Her first child had already died; she had a second, who would later die as well. She was in Switzerland with her lover and assorted friends, partially because they could live together there and partially because they were dodging creditors. From there, she would change the world of literature.
Mary Shelley’s life was extremely complicated. Her mother had already had one child out of wedlock when young Mary was born; her parents married so she wouldn’t be illegitimate herself. Her father was perpetually poor, and after Mary Wollstonecraft’s death ended up marrying someone else apparently both for her money and also so his children would have a mother. This seems not to have worked out for young Mary, as her stepmother apparently did not like her. But then one Percy Bysshe Shelley came to visit the family. Mary fell in love with him, and they began a passionate relationship despite his aforementioned marriage to someone else.
And, yes, she then wrote Frankenstein. There is, it seems, a belief that Percy co-wrote it, but an examination of the notes on the manuscript shows he was basically an editor. And even if he had done more than that, it’s pretty clear that he couldn’t have written her later books for her, given he was, you know, dead. As were, in time, three of their four children; only one of them survived infancy. They did get married, after his first wife killed herself. Honestly, the story of Mary Shelley is full of suicide, illegitimate children, and political radicalism.
The fact that she kept going after Shelley’s death is frankly impressive—because she kept going in the face of incredible odds. She was poor. She was still quite young. She was shamed for her relationship, even though her living child was legitimate. She was possibly—probably—shamed for being the child of her mother. After all, if her mother had a child out of wedlock and was a noted feminist, how good could her child be? Even though, again, she herself was legitimate and never knew her mother anyway. That kind of stuff was considered to be passed in the blood anyway.
She couldn’t write a biography of her late husband, because her father-in-law made it clear that she was only getting an allowance against his best wishes—even though Percy Florence Shelley was his father’s only surviving child and legitimate—and he would not continue it if she ever wrote a biography of her husband. She spent the rest of her life caring for her son and fending off proposals from half of intellectual Europe, as far as I can tell. She is a fascinating woman who then gets shoved aside because clearly her husband actually wrote her book, which a lot of people haven’t read anyway. Heck, she never even said how the monster was brought to life, because Mysterious Means is more thematically appropriate.