In the popular account the stock market went wild in the late 1920s, with people gambling recklessly on stocks and shares, often with money they didn't have. Shares could only go up, they thought, but they were wrong. The market crashed, people went broke, investors jumped off high buildings, and without investment GDP plunged and the Great Depression came about. If it were true it might be a major indictment of unbridled capitalism, but it isn't.
People did overstretch recklessly, assuming the market could only rise, helped by easy money from the Federal Reserve Bank, and the Great Crash came in 1929. It wiped out many investors, but it did not lead to the Great Depression. That came later as a direct result of bad policy decisions. Had those decisions not been made, the stock market crash might have instigated a cyclical downturn and corrected itself after a year or two.
The Federal Reserve Bank, observing that people had bought shares with easy credit, decided to tighten credit and restrict the money supply. This is what you do not do in a recession, when struggling companies need credit to keep going and companies that see opportunities ahead need money to invest in expansion. It was a disastrous mistake.
The folly was compounded by protectionist policies. The Smoot-Hawley Tariff of 1930 shut out most foreign goods to boost home-produced goods in the name of protecting American jobs. Its effect was catastrophic. It sparked a beggar my neighbour trade war as other countries responded with tit-for-tat measures. Unable to sell goods in America, they stopped buying American goods. International trade plunged and much of the world sank into recession.
There were other contributing factors. Banking regulation had been clumsy and restrictive, and left American banks unable to play their part in promoting investment and expansion. Income taxes were massively hiked in 1932, just when tax cuts could have helped.
Unbridled capitalism did not cause the Great Depression, incompetent government did. It is another piece of economic nonsense that President Roosevelt's New Deal government activism helped America's recovery from the Great Depression. It didn't.