Your question is very broad, and I'm not sure this fully addresses it; but this is too long for a comment, and hopefully you find it useful nonetheless.
I think there's a couple false assumptions here.
First, that there is a "better" way to approach studying mathematics. People vary wildly in how they learn, and ultimately I think it's best to find an approach to math that works well for you. Certainly you shouldn't discount the value of mastering difficult material early (and although rare, it is definitely believable for an undergrad to master such material), but at the same time, just knowing a bunch of stuff doesn't make you a mathematician. Grad school is much more about learning to be a mathematician than it is about learning material.
Second, and far more importantly, your line
It seems like if they really did study and understood, then they will write absolutely a better Ph.D thesis than mine.
This is something I'm still struggling to understand intuitively, so saying this in answer to your question also helps me internalize it: mathematics is not linear. Even ignoring the fact mentioned above that mathematics $\not=$ a bunch of facts, and even ignoring the fact that one's rate of learning changes over time, it is impossible to guess ahead of time how your thesis will compare with someone else's simply because there are so many different facets of mathematics. As you go through grad school, regardless of where you start relative to your peers, you will eventually find yourself an expert in some small area, just as they will in their own small areas. What contributions you make to this small area will surprise you, and it's pointless to try to guess ahead of time whether they will "match up" (however you might measure that) with someone else's.
Your thesis is not predetermined; it will be the product a number of things, including the growth you experience as a mathematician as you go through grad school (as well as a fair amount of chance, let's be honest). Certainly knowing more things at the beginning is an advantage, but it's by no means a dispositive one.