It seems paradoxical that kids are both very focused on themselves and quick to feel empathy for those in distress. Children as young as 3 may ask questions about the human distress they see, whether a sick family member or a homeless person on the street. We can help them develop habits that foster a healthy social conscience - aware of suffering, able to feel empathy, able to take thoughtful in action in response.
It begins early. One of the best pieces of advice I've heard on this concerns how to create allowances. A longtime mentor of mine explained her family's policy this way: Each week, every child gets an allowance, as part of their membership in the household. It isn't tied to doing particular chores, because those chores are expected as a member of the household and you don't need to get paid to do them (indeed being paid might have the opposite effect and eliminate any motivation from a sense of membership). The purpose of the allowance is to learn how to understand and manage money.
There are three jars into which the allowance can be distributed: Savings, Charity, and Spending. Every week when your child receives their allowance, they are asked to distribute it into those three jars. Some families require a certain amount in each jar, others leave more discretion to the child. With a young child, I like the idea of training them to use each jar while giving some light parameters - for example if the allowance is a dollar per week, you could distribute it in dimes and set the one rule that some has to go in every jar.
Some families add an additional twist by matching contributions to Savings and/or Charity. For example, if the child gets a $5 allowance and elects to put a dollar in Savings, the parents will add an extra dollar to show their encouragement for that path and to make it grow faster.
Once this system is in place, the really interesting learning can begin. If the Spending jar is getting emptied each week and the child is frustrated not to have more money for a larger purchase, help them experience the discipline of letting the spending jar build up, perhaps tracking amounts toward a purchase that will take weeks or months to save for.
Once the Savings jar is full, to bring it to the bank and deposit it, noting your balance. As kids reach middle school age or older, you could explain basic investment options for this to earn a return. For many kids, having a savings account and perhaps receiving monthly statements from the bank will feel like an exciting symbol of being trusted with more responsibility.
Once the Charity jar is full, cash it out and select a recipient organization - but do so carefully, as the relationship is where the value is here. If possible, make a personal connection so that the act of charity doesn't feel abstract, and so that it preserves the dignity of those receiving it. For example, instead of a simple gift to a food bank, your child could volunteer at a food hall a few times and meet some of the regulars, then donate after having developed at least a beginning relationship with those who will be helped. The more relational, the more real, the more emotionally engaged, the more your child will connect with and remember the value of helping others.