Sheer dumb luck.
Started with being born into a well-off family so, while I didn’t need financial support once I moved out, I knew I’d have a soft landing if I ever needed it. It’s easier to take a risk knowing you won’t end up destitute if it doesn’t pay off.
Met DH when he was starting out in an investment banking career when he was 25. He was on shit money but persevered and is now on a high income.
I completely fell into a dream job that doesn’t exist- ie, it’s not the type of job that people know about and want to be when they grow up. I literally joined a start-up at the right time and was able to create a career that’s pretty much 95% stuff I want to do and love doing, and I have a high income as a result.
(And it’s one of those well-paid HR-linked roles like someone mentioned above).
Because of my skills in that area, I was able able to take on related consultancy work that I can do around my real job. This pays very well.
Then, through a complete random connection, I started doing something as a hobby that had turned out to be pretty lucrative. Because I’m very senior in my day job, I get to pick and choose my hours, to a certain extent, to facilitate this.
I’m reasonably intelligent but I think at least 90% of my good fortune is down to sheer luck.
I’m also a really good saver. We bought a house that’s a lot smaller than our peers bought at the time, but in a terrific location snd we massively overpaid the mortgage, so we’re now looking at moving to a much bigger house, and won’t have to sell our current house to do so.
I will add, though, that nobody knows our financial position. If asked, I say I work in HR and DH works in a bank. I think a lot of my friends and family would be surprised.