Banks are insured depositors, to ensure, if you go bankrupt, you will not lose money.
Stocks are a gamble , however , more like a lottery ticket . There is no " safe" you can buy, you pay for your ticket lottery if the number does not appear. The actions are the same - can not be assured . It is not " recover their money." When you buy an equity stake , which is a small share in the company. Not your money again, until / unless you can convince someone to buy its midst.
Investments are not insurable. The deposits are , because they are not 'investments'. Heck, even the money markets are not protected.