Magic and technology in the same world: why would mages not just use guns?
Many fantasy settings drift toward gunpowder and machines, which raises an awkward question: if a crossbow or a rifle works as well as a fireball, why train for years to cast one?
Writers answer it in a few ways. Magic can do things technology cannot, like healing, scrying or bending time, so it stays valuable even when weapons improve. Magic can be cheaper or faster in the moment while technology needs factories and supply chains. Some settings blend the two, with enchanted bullets or spell-driven engines. And sometimes cultural reasons, like prestige, law or religion, keep mages away from mundane tools. A few even make technology the thing that is fading, kept alive only by stubborn craftspeople.
How do magic and technology coexist in your world, and what keeps one from making the other obsolete?