When reading yoga books, I often get confused because they often translate "ahankara" as "ego." However, when considering the meaning of "ahankara" in yoga, it refers only to the ego. In reality, the general term "ego" also includes "buddhi."
General "ego" = Intellect/thinking mind (yoga's "buddhi") + Self-awareness (yoga's "ahankara")
Therefore, general "ego" ≠ "ahankara."
On the other hand, in yoga, "ahankara" is often interpreted as "ego."
This is the point of confusion.
This is not a matter of which is correct or incorrect, but rather that it needs to be distinguished based on the school of thought and the context. If you understand it in each context, there is generally no problem (but it can be confusing until you get used to it).
"Ahankara" is the reaction of the thinking mind (yoga's "buddhi," intellect), which is an illusion that something exists when it does not. Therefore, what actually exists is the intellect, "buddhi." Because the intellect perceives something that does not exist, the non-existent self-awareness, "ahankara," is created. Therefore, in principle, it is divided into "buddhi" and "ahankara," but in general spiritual terminology, "ego" refers to both of these. Perhaps, if we go back to ancient Greek times, it may have only meant "ahankara," but nowadays, historically, in the spiritual industry, it has been a mixed term of "thinking mind" and "ego," and has been called "ego." Therefore, it becomes quite meaningless just by hearing the word, but in spirituality, when they say "ego," they are referring to both the "buddhi" (intellect, thinking function) in yoga and the non-existent "ahankara" that is a reaction of the "buddhi."
While the function of "buddhi" does not disappear, "ahankara" is only a reaction, so it does not actually exist. Therefore, the "ego" in the sense of "self" is "ahankara," and "ahankara" disappears as you understand reality.
The "ego" (self) in spirituality and the "ahankara" (often translated as "ego" in yoga) are sometimes translated using the same word "ego," which can be confusing. However, "ego" and "ahankara" are equal only in the context of yoga, but they are not equal in general spiritual terminology.