Don't job hop, often companies have a last in first out policy.
Don't take on too much debt.
Keep your skills up to date and make sure your management knows how much you contribute.
During a recession companies are often looking for ways to cut costs so you need to change the way you market yourself to them. If you are an AWS expert for example then you might promote your ability to get AWS costs under control.
Stock up on food, medication, and other supplies.
huh? recession is that short?
It's a good general rule to keep a certain amount of money in cash or cash-like securities but there are limits to this. At a certain point, you lose out more on gains by keepin gmoney in cash than you'd lose by realizing losses to raise cash.
If you believe in the long term future of your investments, the thing to avoid is a cash flow crunch. That's what cash on hand is for. Leveraged investments may face a margin call. That's fine if you believe in the assets and you can cover it. If you can't then you may be forced to sell low.
Part of it too is psychological and being able to sleep at night. If you will suffer extraordinary stress by a 20% price correction then you're probably over-invested, just for your own wellbeing.