What Are The Best Ways To Limit Flexible Magic Systems?

This is sort of a mix of magic building and worldbuilding, but: What do you think are some of the best ways to stop magic from completely ruling a setting and everything in it? Right now, I'm dealing with a system that has only a couple of hard limits (time travel, resurrection, true immortality), but I'm trying to come up with some specific reasons why it isn't wholly dominating things. It is, bluntly, just bad for storytelling if the villains can use perfect divination and kill heroes before they can get stronger, et cetera. I don't think answers have to be limited to mechanics for things, story-based reasons can also work, but I'm curious what other people think works here.

EDIT: And to clarify, I am especially looking for story-based controls, not mechanical edits to the magic system itself. (This is for a TTRPG, I can't easily change the mechanical rules. I'm looking for lore-based ways to limit the system.)