Speaking in terms of averages (the mean of the distribution) again.
It's also been noted (by Stanley in Millionaire Next Door) that first-generation immigrants have an edge over natives and usually end up better off than the natives. I don't know/recall what the exact explanation was but I can think of three.
First, immigrants might have more of an X-factor in the sense of entrepreneurial spirit or risk-taking. After all, it takes something special to move your life from one country to another country as opposed to staying at home in the valley you grew up in. This effect is lost in the second-generation---probably because it has a lot to do with personality-type.
Second, it might be that only the better off (socioeconomic, educational strength, IQ, ...) are capable of successfully getting out of their former country. Successful refugees probably don't comes from the poorest layers of society but rather the layers with more resources. This advantage is lost eventually. "They say" that wealth is made by the first, held by the second, and lost by the third generation. This goes for everybody.
Three, immigrants tend to bring their consumer habits with them so moving to a higher earning/spending country will typically lead to higher savings rates because the immigrant family has not yet learned the consumer habits that allow them to blow all their money. I've seen this over and over. When I grew up, the natives were bitching about how certain refuges drove around on brand new bicycles while on government support. Later I learned how/why? They were getting more support than anyone else. They just spent it more wisely. I've never done/seen the survey, but I bet the concentration of immigrants in the personal finance sphere is higher than the native-born. ERE is immigrant. MMM is immigrant. Of the couples I've met over the years via ERE meetups and visits, a significant fraction was 50% immigrant. This advantage is also lost on average over subsequent generations.
As for taking credit, one should be careful about attribution error, that is, the tendency to associate success success with one's own deliberate skill, talent, ... and failure with society, random luck, ...
All three factors above can play a role at the same time for individuals. The statistical combinations determine what happens to the mean distribution though.
However, looking at my example or myself as representative/explanatory is a clear instance of selection bias. As an individual, it's not hard to imagine how I would not have been able to "solve" for my version of the American Dream (in 5 years
). Had I not been born with a talent for sitting on my ass for 12+ hour days while staring at complex equations. Had I not been born into a stable/supportive family---but instead an abusive or sick family where I would have needed to find a job asap to support a family member(*)---I would never have been able to develop that talent into educational credentials (phd) because I would have been too busy helping out/doing damage control. Without the phd I would never have been able to work in the US.
I would of course say I worked hard for what I have. Others might say I was lucky. It's impossible to rerun the experiment exactly. I can only argue that I would probably have done well on different paths as well.
(*) This is where culture and regulations play different roles depending on what they are. If the responsibility for such a situation fell on the individual+family, like in the US, that talent would have been wasted.