Here are some options.
Depletion of Mana: Magical energy is a non-renewable resource. It simply ran out.
Ebb of Mana: The presence of magical energy in the world rises and falls in a cycle. During the modern era, magic is ebbing (in that there is insufficient magical power to fuel a spell). Perhaps in the future, it will return.
Science kills magic: Magic operates on faith and belief, and stops working if people question it/do not believe in it. With the rise of Science and the Socratic Method, magic was too closely examined, and petered out.
Extermination of Magical Creatures: Perhaps Dragons, Gryphons, and the like are the source of magic. They were hunted to extinction in the middle ages, and their death took magic with them.
Magic is Sealed: Magic was deemed too dangerous to be allowed to exist, and so in a massively powerful ritual, magic was sealed away from the world.
Knowledge is Lost: This one is less realistic...but perhaps magic is not something you can learn from a book or scroll, it has to be taught to you by a living person. Something happened (maybe a war) that pushed the magic-using population to extinction and while their knowledge is preserved...it cannot be replicated.
Abandonment by the gods: Perhaps divine beings powered magic. Humanity pissed them off. So they left, taking magic away with them.
I'll stop here, but I could easily keep going.