If you want to do a marvelous deep dive on this concept, I highly recommend the Evolution of Cooperation by Robert Axelrod. It's a masterful work on the game theory behind how different species/animals/people cooperate and why, and it is a deeply intellectual and rigorous book that uses no more than 6th grade algebra to get its point across. Promise you you'll like it.