How did Dumbledore become powerful

Was Voldemort a better wizard than Dumbledore?

In my eyes, this question is easy to answer. Dumbledore is clearly the better wizard, and here's why.

Dumbledore is obviously a humble man, largely due to flaws in his youth. On many occasions he says that people who call him "the most powerful wizard of all time" flatter him. But you will find that he does it well never to tell falsehoods, he just beats around it. For example in Daniel Brigham's answer to the conversation with McGonagall: "He had powers that I will never have". This is true because Voldemort had Horcruxes and the use of Inferi, but Dumbledore does not say, "Voldemort would have whipped my pants in a duel!" Because he knows he's more powerful than Voldemort.

Next, let's look at some quasi-quantitative data. Duels! Let's look at the fights that Dumbledore wins. He defeats Grindelwald at the height of his power against the power of the Elder wand. This takes some effort, but what we don't know is that Voldemort couldn't have accomplished the same feat. We see Dumbledore defeat four Ministries of Magic in a 10 second duel, 3 if you don't count Kingsley. And perhaps most importantly, he ends the duel between the Death Eaters and the Order at the Ministry. All of the Death Eaters, who are claimed in the book to be almost as bad as Voldemort himself, flee from him, and he rounds them up with very little effort. Voldemort, meanwhile, confronts no more than two at a time. Harry's unarmed parents, Madam Bones, Scrimgeour. Basically, Voldemort only kills one on one and usually against the unarmed, although it's possible he killed a ton at a time, but even that requires little skill. The Avada Kedavra is just a charm. The only time we see him having a real challenge is during the Battle of Hogwarts, where he duels three simultaneously, McGonagall, Slughorn, and Sprout (?). He cannot kill any of these three, although he will not be overcome by them. Of course, it's hard to say definitely, but I'd rather give Dumbledore the edge here.

When we talk about the duel at the Ministry, we look at the duel between Voldemort and Dumbledore, their only face-to-face fight as far as the books tell us. Voldemort is doing his best to defeat Dumbledore while Dumbledore knows that killing Voldemort is useless. He apparently defeated Voldemort after wrapping him in water before Voldemort owns Harry and then runs away. Meanwhile, Dumbledore charms the statues of the fountain of the magical brothers to protect Harry. Now it is not clear who is actually superior. Dumbledore isn't really trying to kill Voldemort as he knows it's useless so he may be trying to catch him alive or get information about the suspected Horcruxes which would mean he doesn't give everything, but he also owns The older wand during this fight and Fawkes takes a curse that appears to be fatal so Dumbledore doesn't fight with sheer skill. However, it seems like Dumbledore has the upper hand over me.

In all honesty, I think the worst evidence is schoolwork. Yes, it might seem overwhelming, but think about the description of the two wizards at school. We have Tom Riddle, the calm but talented boy who charmed all of his teachers. He received top grades in every subject and the award for special services to the school. Do you know who else got top marks in every subject? Dawlish, the perpetually confused Auror who is one of the ministerial officials that Dumbledore owns. And this award for special achievements? He arrested the wrong person, who was not involved in a known battle, for a crime he committed. What a talented young guy. Dumbledore? According to Skeeter, he won EVERY major award at the school, was featured in many research journals including Challenges in Charming and Transfiguration Today, excited all of his NEWTs, and was soon in correspondence with the most prominent magical researchers of the day including Nicolas Flamel Man who was hundreds of years old at the time but needed the help of a 17 year old boy. YES, he was talented like no one else. You can try to excuse this by the old man, "Yeah, but Riddle didn't try in school" except that he did. He exceeded his NEWTs, he explored tons (albeit in dark magic), it was hardly like trying to hover under the radar and slide past in class.

Basically, I believe Dumbledore has a slight (worst-case) upper hand in all categories, which means Dumbledore wins by a fair margin overall. Of course, there are many details that are not covered in the books, so it is difficult to be 100% sure. In all honesty, it seems more interesting to me whether Snape is a more powerful wizard than Voldemort.