It seems you want to keep separating the two and not understand. If "ego is a person’s sense of identity" and "selfishness means to act in your own interest", then understanding how one develops from the other is important. The sense of self, self-construct, self-image, self-view is directly tied to how we view ourselves in reference to reality, which is a worldview, perception of reality, in which others exist and are part of our social cooperative way of living. They are both linked, and you are trying to keep them separate as to deny the validity of what I am saying.
Ego = I = self. Simple, yes. It is the sense of self, everything I have suggested. And it relates to being self-ish. From self, to selfish, requires ego-I. Ego is inextricably linked to the concept of being selfish. You tried to invalidate the connection. Synonyms are valid, they are metaphorical (as X as Y, X like Y) correspondences. Maybe you need to go look at your etymological understanding instead of projecting that deficiency onto me. Peace.