I read pg's collection of essays (Hackers and Painters) in my 20s, and it single-handedly prevented me from being radicalized by leftist ideologies. The one insight from the book that I will always remember from the book is this: if you want to be rich, make something people want. Money is fiat to the value you've generated in growing the economic pie. It is in fact possible gain wealth ethically.
However, there are several addendum to this argument:
1. Most billionaires are hedge fund or private equity managers whose name no one has ever heard of. They provide liquidity or allocate capital or something. It's actually a major PR failure that people think Jeff Bezos or Elon Musk when they think of billionaires; If we can ignore their character for a second, these guys are actually hyper-productive and they've created immense wealth for society and are compensated in a power law sort of way.
2. Rich people make money with money - in the form of dividends, interest, rent, etc. Poor people trading labor for money. Salary only scales linearly; therefore, generating value for society is only half of the equation, you must also have ownership, or slowly invest your earned capital to eventually make money with money (i.e. retirement).
3. There must be a growing economy, otherwise it's a zero-sum game; a fixed-sized pie. In a stagnant economy, the customers you gained are customers another company lost. The wealth just shuffle hands from laid off workers to your employees. I think this is why Jeff Bezos once remarked that a stagnant economy is incompatible with free democratic society.
4. There must be a new frontier, otherwise the chance of success is pretty much zero. Software is this generation's new frontier. There are no bars to entry. You just need a laptop and the skill to arrange symbols on a screen in the right order. It's literally alchemy. On the other hand, non-software startups can't just do things. In many cultures, maybe due to their lack of growth, "entrepreneur" is actually very low status. It's synonymous with ne'er-do-well who can't find proper work. In the case of USSR before its collapse, it's synonymous with literal thieves and black market thugs.