"By seeing that the ego is unreal. "
If you let go of all definitions of yourself, the Truth of the unreality of the ego shines forth on its own. To recognize when you define yourself, just recognize when something feels limiting or uncomfortable, and let it go.
Then the Truth that you cannot be described in words or thoughts, that you are not even a separate entity, shines forth. Who we really are, can be called the "Source of Love". That's the closest description that can be given to what is indescribable.
Don't try to see the Truth with your mind. That would be like trying to see the sun with a flashlight. But the sun can be seen by its own light. Who we really are can be seen by the light of Love.
The ego is just a piece of software, a self-reflexive concept with a function related to survival. Although not ultimately true, it has relative truth and function to serve consciousness when we let it take a supporting role instead of center stage...when the software gets updated, so to speak.
Two: "To recognize when you define yourself, just recognize when something feels limiting or uncomfortable, and let it go."
When something is uncomfortable, feel it first. If you try to let go of the discomfort before it has delivered its message, it can easily become spiritual up-leveling - using spirituality as a technique to feel better.
I find it useful that when there is something uncomfortable, feel it first and then look at the belief that is at the core. And there you will see as you have said, where you are defining and limiting yourself.
This kind of self limitation is perfectly normal and innocent. It continues until we are willing to embrace the limitations of form and find the formless hiding there in plain sight!