Self esteem is a quality issue. Ego is a quantity issue. Self esteem is a matter of what one thinks of oneself. Ego is a matter of how much one thinks of oneself. Some of the most egotistical people one will ever encounter are the egotists who hide their egotism behind low self esteem. Egotists can get away with far more extreme and extensive egotism if it is expressed as low self esteem. To esteem oneself accurately, one must employ a modicum of time and effort toward introspection. It is easier to minimize ego if one employs an accurate estimation of them self.
I like this explanation for ego....... quite different than what I had assumed when I was younger. https://www.near-death.com/experiences/notable/christian-andreason.html#a13