Yes, that is called an emergency fund. I didn't want to go into a big explainer of how a typical pre-tax & post-tax index fund savings brokerage works + cash emergency fund in savings works to a random on the internet while there are many other better resources out there.