Here's the thing about egos and basketball -- it all comes down to sportsmanship.
Being confident in your abilities as a player is a good thing. Keep in mind that the better you get at the game, the better your team gets. So it's a good thing to practice hard, and to give it your all during every play. Those are the markings of a strong athlete.
However, ego gets in the way when it prevents you from putting the good of the team ahead of yourself. For example, if your ego makes you put up every shot instead of passing the ball, or if you find yourself refusing to acknowledge the traits other players bring to the game, it can be damaging to your team's strength and even stunt your own growth as a player.
Take a look at the GOATs of the game - like Michael Jordan, Kobe Bryant and LeBron James -- each of those players have been accused of having an ego that prevented their team from excelling. Each of those players also won championships when they learned to set their egos aside and play unselfish basketball.
Be confident in your abilities as an athlete, strive to do better ... just don't let it get in the way of thinking about your team.