Your kid is now experiencing a variety of human emotions and one among them is being selfish. For a 5-6 year old kid the selfish nature is not the actual selfish feeling the elder or the older people have . It is more about wanting the things for themselves and lack of sharing it with their peers or younger ones. While it is normal for them to show selfish behavior for a short while they also should be made to understand how it affect others.
What you can do
When you see the selfish behavior in your kid, first try to understand the reason behind it and whether it is gradual or out of the spur moment reaction. Help him understand that feeling and how and why it is bad to have such feelings.
Try to point out the behavior at a later stage, and let them know how he would have behaved differently which would get better results. Be firm and consistent when you mention to him about their selfish act and how it has impacted others and why it is not acceptable. Start reasoning with your kid from this age. This helps him/her to understand you better. At the same time, if you find your kid has improved and shown selfless act, acknowledge it and encourage it.