Brian Sanderson (and others) have written plenty of magic-filled books with more interesting endings. If you want a 'hard magic' system, the one in the Mistborn series is pretty interesting (ingesting and 'burning' particular metals for particular abilities):
* https://en.wikipedia.org/wiki/Mistborn
* https://en.wikipedia.org/wiki/Brandon_Sanderson
'Booktuber' Merphy Napier recently did two videos on magic systems in fantasy novels:
* https://www.youtube.com/watch?v=WcMQk4ltJa0
* https://www.youtube.com/watch?v=Nd6f3tAOUHk
Sanderson has lectures on a system of rules for magic in books to balance their coolness against deus ex machina: https://stormlightarchive.fandom.com/wiki/Sanderson%27s_Laws...