Like insurance, regulated stock exchanges opened the door to high-quality stock offerings which allowed businesses to procure financing. That both lowered the cost of capital and also spread both the risk and returns of an investment to a wider group of people.
The Antwerp, formed in 1531, traded what today is called of government debt but not stocks.
Over time, investors created limited companies to invest in a voyage, typically to Asia (the East Indies). Multiple investors funded trips to diversify the risk of loss from any single ship. These companies dissolved after the completion of each voyage, either with success or the loss of the ship. Over time, large companies formed that issued stock and paid dividends, rather than creating new small companies every time.
The walls of London coffeehouses contained stock and debt issues that could be bought and sold. Investors typically hired brokers to find counter-parties to buy and sell stock offerings.
Many early stock issues were for sham businesses. Until, in 1773, the London Stock Exchange opened ensuring quality stock issues. Exchanges in the newly formed US formed soon after, first in Philadelphia then, soon after, in New York with the New York Stock Exchange.
Little changed over the next centuries; other countries opened stock exchanges, but most businesses preferred to list on the NYSE or in London. Eventually, in 1971, the National Association of Securities Dealers (then NASD, now the Financial Industry Regulatory Authority, FINRA), created a new computer-only stock exchange, the Nasdaq.