Historically on a long enough timeline, the stock market beats cash.
For example, even if you bought at the peak of the last bull market in 2007, right before the crash, you would have more than doubled your money by now.
Whether that will continue, no one knows for sure but if you are 25 for example and have decades of investing ahead of you, you could benefit from the wealth creation that the stock market can provide. That’s assuming that you also have a long time horizon of course - so you’re not planning to buy a house with the money that you’re investing in 2 years, for example.
On your 2nd question, the only ‘right time’ would be when it’s right for you, based on your sentiment, analysis and research. What you could do is decide if you will “average down” (i.e. buy more, so the average price you pay for the stock or ETF is lower) or set a price or % change in the price when you will sell, ahead of time, as a strategy to manage your emotions. Rather than just reacting impulsively to price movements.