This word maya, people take it to mean illusion, but maya is not an illusion. Maya is something that can cause illusion, which it does. The outer world is real. The people and objects of the outer world are real, but there's a second world, our inner world, of emotions, attachments, desires, likes and dislikes. That inner world is our creation. The outer world is not our creation, it's God's creation. God made the outer world using His power, maya, and we made our inner world out of our own confusion.
भयं द्वितीयाभिनिवेशत: स्या-दीशादपेतस्य विपर्ययोऽस्मृति: ।
Bhayaṁ dwitīyābhiniveśhataḥ syā-dīśhād apetasya viparyayo ’smṛtiḥ.- Bhagwatam 11.2.37
Bhagwatam says, “We are eternally turned away from God.”
Therefore, God's power, maya, has influence over us. And the effect of the power of maya is to make us forget our true identity as Divine souls. Instead we identify as the body, the material body. And since we identify as the material body, we seek belonging in this world, because it's the material world, so it matches with our material body. We seek happiness in this material world because if I am the material body, then my happiness must be in this material world.
This problem is all created because we have turned away from God, or more correctly, we are eternally turned away from God. If we were to turn towards God, the effect of maya on us would be finished, however maya would not be finished. Just like if a prisoner is released from jail, the jail is not destroyed. The bondage of jail on that person has been released. Similarly, we can be released from the effect of maya. We can be freed from the bondage of maya, but maya never ceases to exist.
Even when the universe is dissolved, the original mayic energy is not destroyed. It simply dissolves into an absolutely subtle form.