To do this, it has to present to you some kind of temptation or lie, something untrue, and generally something that upsets you in some way. If it can especially get you to have a reaction, or be triggered, then you have fell for its trap.
The ego uses your own beliefs and your own blind-spots, as a way to get you to agree to go along with it. While you remain unconscious and attached to a certain egoic belief, you are quite literally agreeing with the ego and giving it permission to use this against you.
The ego cannot take power from you, you have to give it away. When you give it away, you give it away through playing the role of a victim, perhaps entering into fear or guilt etc. This is your way of making it seem as though the power you share with God has now been separated from God and is handed over to the ego.
In certain other religious circles, this principle is taught in terms of the devil, sin, and how the devil operates. That is, that you first must sin which means you believe in something that's mistaken. Then based on this sin, you have literally agreed that something untrue is true. And now this creates an 'open door' and an invitation and a resonant agreement, which allows 'the evil' to come in and control you. This is also how evil 'spirits' enter people's lives. Because YOU have violated a law of God, so to speak, by going against it, you have permitted darkness/ego/devil to use this darkness against you.
But notice here that the ego/devil does not actually have its own power. And it completely depends on you agreeing with it, and continuing the 'sin' i.e. the false belief. It also does not actually have any power to prevent you from undoing that belief, or choosing again, or waking up. It has ZERO 'actual' control over you, besides your own willingness to play along. If you were to decide to stop playing along, and to withdraw your belief, and to take back your power knowing it is yours, and knowing that the ego can do absolutely NOTHING to stop you, the ego would be dis-empowered.
The only tool the ego has is the presentation of illusions, in an attempt to try to play upon what you believe and to convince you that it is either your friend and ally, or to distract you from choosing again by throwing fears or guilts or rationalizations or whatever else your way, to try to once again push your buttons or pull up your past hurts or play upon your own fears, to keep you ensured in its mindset. And often, in unconsciousness, you will go along with this and be pulled right back in, but ONLY because you have not become conscious/aware enough yet to discern and to decide not to listen or believe what it's saying.
So really the ego is just a mirror for your own mis-beliefs. And it shows you and reflects back to you what you currently believe. Change your belief, and the reflection of that belief - the ego - must disappear.
There is nothing keeping you stuck. There is nothing stopping you but yourself. There is no reason why you can't be loved. There is no reason why you can't wake up. The only thing keeping you asleep is yourself.