This reminds me of Ronald Inglehart's work [1] on "Material" and "Post-Material" values and their relation to wealth / stability - ie high amounts of the latter are causal to Post-Material values, which would include charitable giving, tolerance, etc.
Using his World Values Survey [2], surveying individual values across 100 countries from 1981-today, he showed across all major cultures that you can see how several generations of stability (both income and sociopolitical) are required to get to post-material values, ie you don't get rich and change your values, they crystalize in your early/mid 20's, so you need to feel good until then and not experience trauma after to maintain those values.
Using his World Values Survey [2], surveying individual values across 100 countries from 1981-today, he showed across all major cultures that you can see how several generations of stability (both income and sociopolitical) are required to get to post-material values, ie you don't get rich and change your values, they crystalize in your early/mid 20's, so you need to feel good until then and not experience trauma after to maintain those values.
[1] https://en.wikipedia.org/wiki/Ronald_Inglehart#Cultural_Evol...
[2] https://en.wikipedia.org/wiki/World_Values_Survey