I assume that you are asking about what Carnegie said in his essay "The Gospel of Wealth." In that essay, Carnegie said that a person's excess wealth should be used for the benefit of the people as a whole.
It is very important to note the way in which Carnegie said that this should be done. According to Carnegie, people who amassed great fortunes were the fittest people in the society. They were the ones who best knew how to make money and how to spend it. For this reason, Carnegie argued that the rich should be the ones to spend their money for the benefit of the people. In other words, rich people should not simply give their money to charities because there was no guarantee that the charities would spend the money wisely. Instead, it was important that the rich people themselves should direct the use of the money.
So, Carnegie said that wealth should be used to help the general public, but this use should be controlled by the rich and not by government or by charities.