Ego vs. Mastery is a balance that we all need to find in our careers. I'd argue for a 80/20 split in favour of Mastery.
Focus on your craft and on developing your skills. However, don't be naive enough to think that simply working hard and being great at what you do will be enough for success.
Success inevitably triggers others' insecurities, and this is where you must temper your Mastery with an acknowledgement of others' Egos, and patience with your own.
Thanks for reading, Shivendra!