Realism has nothing to do with magic. You can write unrealistic police-procedurals, or unrealistic kitchen-sink dramas, or unrealistic hard-sci-fi. What makes something realistic is much simpler than that.
Actions occur, those actions have consequences, and the consequences of those actions are internally consistent
That's it. That's all there is.
More specifically for you though, that means...
You need to think about the consequences and limits of magic
The problem with magic is that you could have your characters get out of anything with the appropriate spell. So you need to think about what can and can't be solved by magic. If something can be done by magic, what are the consequences to the world? And if something can't be done by magic, what are the consequences for magicians and non-magicians dealing with that situation?
Harry Potter is possibly the most famous example of failing to think about this. There's no basis for an economy in the wizarding world, for starters, because if you can magic meals, clothes and furniture into existence then the only thing you'd ever need to pay for is luxury goods. Harry keeps wearing glasses for no obvious reason, as do many other characters, in spite of magic apparently being able to fix all non-magical ailments. And then there's the impact on laws of physics like conservation of mass/momentum/energy, or the implications of time travel.
Conversely, consider Charles Stross's Laundry series. Magic has consequences. Get an invocation wrong, or be in contact with the wrong thing at the wrong time, and your soul is sucked out and consumed. And even if you get everything right, using magic is a beacon to microscopic magical parasites which will literally eat a little bit of your brain every time you do. So most magical threats are generally put down with bullets (with appropriate banishment runes carved on them). Actual combat magicians do exist, but the ones who know what they're doing are very careful with what resources they call on.
You can take this in any direction you like, of course. But every magical action has consequences. Even if that action is as simple as food appearing, or magicking an armchair out of thin air, you need to think about what it means for your world.