The standard view is that Capitalism is the result of developments in technology (particularly, the invention of steam power).
But for Weber, Religion made Capitalism happen. Not just any religion; a very particular, non-Catholic kind of the sort that flourished in Northern Europe where Capitalism was particularly vigorous.
Capitalism was created by Protestantism, specifically Calvinism, as developed by John Calvin in Geneva and by his followers in England, the Puritans.