It´s not THE answer. It´s part of a wider long term solution though.
The trouble, as has been said, that when you make something illegal you do two things;
1. You glamourise it (which increases the demand, sometimes from a particular part of society which can be closer to illegality because breaking the law and societies norms is part of a lifestyle choice and the debt from drug use can drive you there afterwards)
2. You reduce, and specialise, the supply
So, price is high, profits are high, as well as the need to commit crime from those on lower income users is incentivised. Every time there is a major drugs bust, you reduce the supply and increase the price (and the profits of those suppliers who were not busted)
We've all seen, locally, people living lifestyles that can only be funded by the sort of tax free money that drug supply brings, this (and the way parts of the media portray that lifestyle and gangster culture, historic or otherwise) glamourises suppliers further.
We saw all this in the era of prohibition, the trouble is that once alcohol was legalised again, it was too late. You'd created a gangster culture and all that happened was that those who had made money from alcohol had to move into something else to maintain their lifestyle, the cat was out of the bag. Not surprising that protection rackets were part of this because the disease had created people who had become good at violence.
Would legalising drugs work, I'm not sure, look at the opium dens and wars in China in the 19th century, it brought down China as a leading world power in many ways (albeit helped by British aggression) and they are only now regaining what they lost. I'm not sure what the solution is but getting the cat back in the bag in terms of demand and supply has no easy solutions.
Smoking was never fully banned, I have a feeling that the lack of sexiness in vaping has done for this, no-one has managed to create a marketing for vaping like Marlborough Man but it took many, many years to create that type of image in the first place. You don't see many smokers about these days, ask yourself not why people cannot give it up, but why they start in the first place, that's where the long term solution lies, stopping that.
Drug use, unemployment, boredom, the pushing of drugs on the street to the vulnerable or easily influenced, the glamour of illegality......