First of all, levels are gained by defeating monsters, and the only time he leaves his dungeon can probably be counted on one hand. That’s why his level is only 20, which I assume was reached even before he locked himself away in the dungeon.
Now, about his power—why does he only have so much ability even after 5000 years? It’s because he’s a fool. He has ridiculously low compatibility with magic. When he was rejected from the magic university, he should have just become a warrior since that’s where his true latent talent lies. But no, he’s a fool.
And he foolishly did magic research for thousands of years. He spent months mastering basic spells that would take others only a day to learn if they were compatible with magic. I believe he even mentioned spending nine whole months to master a single spell that his peers could learn in just a day. Just imagine how long it would take him to learn intermediate or advanced spells. The time required would be astronomical. But he’s a fool, so he doesn’t care and just keeps researching.
Please understand, though, that he’s incredibly skilled at magic, considering how ridiculously low his compatibility with it is. Also, his stats, especially his MP, are an absurdity. Normal people wouldn’t have that much MP at just level 20. That’s a result of the immense effort he’s put into studying magic over the years. Also, he doesn’t focus solely on offensive or defensive magic. He often goes off on tangents, researching useless things that take precious time away from increasing his power.