Basically she was born a noble but not one with great connections. Somehow she was arranged to marry the future heir of Russia. She wanted to impress his mom so she went crazy learning Russian and about the Russian orthodox church and stuff and therefore became loved by the people. Her husband became the ruler and sucked so she overthrew him
and maybe ordered his death but that's unsure. he did die soon after abdicating the throne though. Then she made lots of reforms and stuff based on the enlightenment and people loved her. One example was that she summoned people of all kinds of occupations and ethnicities and religions to try to understand what laws need to be changed and such
but the serfs, aka 9/10 of the population, were not invited. It kind of failed because these people didn't believe that she actually wanted opinion of legislation so they spent their time coming up with a pretty title for her instead of discussing laws. She told them off for that. Anyways, she also conquered some places, and Russia became bigger and overall nicer as long as you weren't a serf. She had many partners and eventually had a kid (a son). But with age she became paranoid and less powerful of a ruler. And she was paranoid her son would overthrow her like she overthrew her husband so he grew up emotionally stunted and unfit to rule. Then she died and he was the ruler. Really prepared him well