This is the one thing I really appreciated about the Discworld books on a recent re-read. The wizards are hilariously incapable of doing anything useful. Terry Pratchett doesn't give a super clear series of rules for the magic system but it's abundantly clear that the wizards are incapable of actually useful magic, and mostly just get too tired up in internal power struggles to ever do anything. And in the book Sourcery, the first sourcerer (one who can create new spells) to grace the disc takes over the world, realizes running the entire world is too stressful and tedious then creates his own pocket dimension to play with magic in instead (I'm oversimplifiing here, skipping over a bunch of interpersonal stuff related to a sentient wizard's staff run by a dead guy who tricked Death among other details but that's the general gist)
By making the wizards so useless it bypasses any of the logical problems posed by creating a world with magic in it. There's no "why no use this spell" "why not magic out of this problem" etc. all because the wizards are too useless to actually do anything