Naturally wealth had a bad reputation.
Two things changed. The first was the rule of law. For most of the world’s history, if you did somehow accumulate a fortune, the ruler or his henchmen would find a way to steal it. But in medieval Europe something new happened. A new class of merchants and manufacturers began to collect in towns.  Together they were able to withstand the local feudal lord. So for the first time in our history, the bullies stopped stealing the nerds’ lunch money. This was naturally a great incentive, and possibly indeed the main cause of the second big change, industrialization.
A great deal has been written about the causes of the Industrial Revolution. But surely a necessary, if not sufficient, condition was that people who made fortunes be able to enjoy them in peace.