You "did" the stock market wrong then. It's hard to lose money over time unless you make terrible decisions. A diversified global fund, rather than individual stocks, with money drip fed in gradually to ride out any shocks (such as the orange wanker's tariff fiasco), and an understanding that it's to be left there for AT LEAST 5 years, if not 10, is a good idea.
OP, £140k is a relatively small amount of money these days, although very nice to have. In your position with nothing solid behind you (ie. no house owned outright, cars on finance), I would NOT touch buy to let with a bargepole. That is for people who are in a much more solid financial position than you in my opinion. You still don't have an owned roof over your head. Your mortgage is still high. Where is your sinking fund for your own house if it needs major repairs at some point, never mind on a rental that you have another mortgage on?
It sounds like you were unlucky with your timing of your S&S. I was too when I put some money into S&P500 in a general account just before Trump did his tariff damage. But I will leave it in there as I know it will recover. The money I had in my S&S account before COVID took a hit and have since recovered and made a lot of money. I gave DS £1000 on his 18th and he put it in a Vanguard fund just before Putin invaded Ukraine. Just bad timing. He left it there and it has recovered and now doing well.
There is sometimes an argument for not paying off some of the mortgage in one big go, if, instead of making steady overpayments of the mortgage every month you drip feed it into investments instead.
I just wouldn't put all your eggs in one basket. There is a lot to think about. Ideally you want to be rid of any high interest loans eg the car, because they would just eat any profit you make on savings interest or investment returns.
I'd want to make sure my emegency fund was robust.
I'd want to make sure my pensions were as good as they could be because of the tax relief advantages.
I'd want to be thinking about the stage of life my children are at and whether parental contributions to uni costs are on the horizon, and earmark some savings for that.
You could drip feed 20k a year into a S&S ISA over a few years - shop around for some high interest savings accounts, mixture of easy access and longer term ones, so that each financial year you have access to £20k to drip feed into your ISA. (This is as long as your mortgage interest is low.) Some people would put all the rest in a general account and do a "Bed and ISA" every year shifting 20k across to their S&S but I'm not sure I'd do that in your position. I'd prefer some cash reserves in a high interest savings account elsewhere.
You would use all that money up in just 7 years just filling your ISA up each year. You would be very surprised how quickly 7 years will fly by.