That’s one of the roles that churches, synagogues, mosques, etc. used to have (and still do). As societies have left behind religious institutions, we still haven’t figured out how to replace the many vital social functions that they used to provide.