Assuming you desire to invest in stocks, ETFs, and/or mutual funds, you should be sure you have enough to pay your bills for a period of time so you don’t have to unexpectedly sell any investments at a loss or during a bad time in the markets. This means you should have an emergency fund (whether it is 3, 6, 12, or more months of expenses), along with cash reserves of up to 2 or 3 years of expenses, depending on your job security.
Also, you will want to pay down any debt that has an interest rate of greater than 5%. If it has a lower interest rate, you can probably earn more in the stock market than what you are paying in interest. For reference, the S&P 500 has had an average annual return of 8.9% over the last 30 years (1980-2019). But if you have debt that you are paying over 10% interest on (like a credit card), that is a *guaranteed* 10% loss on that amount; you could gain more in the stock market, but you are probably better off paying off that *guaranteed* liability.
Once you have a substantial amount of cash for bills and you only have low-interest debt, I think it is safe to say you can start investing! Take a look at What I Believe to be the Best Investment Strategy.