Hungary is a particularly interesting case in intellectual achievement since it produced so many influential scientists despite it not having the industrial base or wealth of many of its European neighbors, and a relatively small population.
You might enjoy JvN's take on the importance of a well run educational system[1]. His comments seem even more suited for our current condition.
Feynman was a genius, but he dissects his own accomplishments and you can see how if you only knew this, this, this, and that, plus a few different methods of integration, it would have seemed obvious to you too.
tl;dr we do our heroes a disservice when we hold them in too high esteem, because we discount their very human, and very costly, accomplishments.
But lots of hard work alone does not explain why one person who put in a lot of hard work will greatly outshine many others who also put in a lot of hard work.
Nor does it explain phenomena like prodigies, who excel at a really young age, with far fewer years of effort than many others.
Finally, creativity and inspiration often play great roles in mathematical and other endeavors. They can't entirely be explained by hard work or dedication, which are often prerequisites for intense creative efforts but aren't all there is to it.
On the subject of Hungarian scientists, I've read that Europe in general was a hothouse of intellectual achievement and education before the 2nd and especially before the 1st World War. It was just sheer insanity that they virtually destroyed themselves, their civilization, and culture, and exiled and murdered many of their most brilliant men.
Even sadder that the world might be preparing to do it again. Those who do not remember the past are doomed to repeat it.