Maya is often translated as illusion, but in the Gita it is closer to a divine power that makes the world appear as it does, hiding what is deeper. It is not a claim that the world is unreal. It is an observation that our ordinary way of seeing, shaped by the gunas, misses much. Many people sense this when they realize they have been wrong about what would make them happy.
Gita 7.14 says that maya, the divine power that binds beings through the gunas, is extremely difficult to overcome by personal effort alone, but those who take full refuge in God cross beyond it, so when life feels overwhelming or deceptive, combine sincere effort with humility and surrender instead of relying only on ego and willpower. Gita 7.25 says that God's own divine power veils Him from those who are deluded, so He remains unrecognized though always present.
Gita 7.25 adds that realization depends on removing this veil through sincerity and grace, so accept that some truths are not obvious and cultivate patience and openness. Gita 15.1 describes the world as an eternal tree rooted in the Supreme above, not as nothing, so see your life and the world as a connected whole springing from a higher source, and look beyond surface details to the deeper reality they depend on. Hold appearances lightly, and keep your attention on what endures.