To be fully honest with you the best time to invest was in the past. But the second past time to invest is now.
We have been through some heavy and hard times since January 2020. The whole pandemic made the market even more complex and difficult. The whole pandemic have been through some heavy and fast roller coster ride since pandemic started.
The more correct answer to this is that no one knows exactly the right time to buy stocks. Because the stock market is always going down and up every hour.
However investing is a long-term game. And if you are investing for a period longer than 5 years then the time to buy stocks may be as soon as you have the money available to buy these stocks you want.
If the market falls down not so long after you have started your journey with investing then nothing serious will happen because if you have taken the time before investing to research the companies or funds you are investing in and you have chosen companies like Tesla, BMW or Amazon who will be around for years to come then the theirs stock will soon or later go up again.
And since you are here for the longer term you will have plenty of time to make up those losses. And the best way to recover from market drop is to invest more money when the market is low as in the market drop.
Buy stocks during a market crash means that you will get much more shares for less money or for the same amount as you paid for less shares before market drop.