Kids aren’t selfish jerks because they are inherently bad, but because as kids they have strong emotional responses and poor emotional control, are self centered and bad at interpreting/understanding other people’s feelings, and haven’t learned effective alternative strategies for solving problems yet. Luckily, these are substantially trainable skills.
Removing the toy that is the focus of a lot of interpersonal drama is (sometimes) a quick way to diffuse the immediate conflict. Then talking together about how different people are feeling in a particular circumstance and getting group feedback on ways to solve problems constructively is the way to help kids improve at the skills they are lacking.