Your asset allocation is how your money is split between major asset classes: stocks, bonds and cash. It drives most of your portfolio’s behaviour, far more than the choice of any single security.
Stocks aim for growth but can lose 30 to 50% in a crash; bonds are generally more stable, with a lower return; cash is available immediately, with little growth.
Your time horizon matters a lot: with 20 years ahead, a high share of stocks can make sense; for a purchase in 2 years, stable investments are wiser. Your ability to sit through a drop without panicking matters just as much.
Basic rule: first build an emergency fund (several months of expenses) in an easily accessible account. That way, an unexpected bill never forces you to sell your stocks at the worst moment.
Examples
OMEGA-X (fictional market) : This fictional market rises over the long run, but in waves, with sometimes deep drops. A good allocation is one that lets you get through those dips without being forced to sell.
2008: the S&P 500 falls about 38% : In 2008, during the financial crisis, the US S&P 500 index lost about 38% over the year. It only got back to its 2007 peak in 2013. An investor who needed their money in 2009 and had it 100% in stocks took the full hit: your allocation has to match your horizon.