That is a bit misleading though. While a minority of the wealthy people are trust fund kids and thus inherited all their wealth, the majority of them did not come out of poverty either. They typically come from families that are wealthy and thus benefited from growing up in better neighborhoods, attending top schools, their families networks of connected friends and so on. The old born on 3rd and think they hit a triple.
That all said, by that I mean typically if you are rich, you usually came from an either upper middle class or very wealthy family. Upper middle class isn't rich of course and while that gives you a good start, it doesn't make you rich.
https://inequality.org/research/selfmade-myth-hallucinating-rich/
We are demographically an upper middle class household, yet I grew up in poverty, not poor, in poverty. I know plenty of other upper middle class households, but I don't know of any others that grew up in poverty. Usually, they grew up in at least a middle class home themselves.