If you open up a Roth IRA this is a great account for high-income professionals aka corporate software developers. The money that you put in is called contributions. And you've already paid taxes on it (that's called "post-tax" or "after-tax").
The money that gets earned from investments in the account is called... earnings.
You can take contributions out of the Roth tax-free and penalty-free. But taking out earnings has a penalty if you take it out before you retire.
Since you can take contributions out, this is what makes it a great emergency fund. The limit for the contributions per year as of 2022 is $5,500 but that's for each filing adult in your household so you and your partner could contribute $11,000 per year, which is what I and my wife do. Also, beware the MAGI (um, no, not the guys from Brendan Fraser's The Mummy).
You could max it out each year and then in an emergency event, just take out your contributions.
If you're contributing the maximum of $11,000 a year (and it tends to go up but assume it's constant) and then there's an emergency in 10 years, well you're gonna have about $110,000+ or so that you can draw from now. That's just contributions.
The earnings on that money if invested in the S&P 500 at an 8% rate of return accounting for inflation would be $62,100!
In case of emergency...
The reality is that emergency events that might constitute having to take money out of the Roth IRA are few and far between. They are black swan events. Within 30 days you could probably float an emergency on a credit card and pay it back. If you lost your job, you could (hopefully) find one within 30 days with a corporate pedigree.
SO in the event that you can't make it work for more than a month or it's a crazy amount of money THEN you could lean on the Roth IRA. And that's IF you don't already have a cash cushion in checking or savings... or a Cousin Vinnie or somewhere to get funds.
Otherwise, in nearly all cases, it's just sitting there earning money day after day while you sleep and best case scenario, 30-40 years from now, you've got a $1.3M+ investment account that you can take advantage of.
Now that's F U money.
Check out the differences between Roth and Traditional IRAs and don't forget that a) this isn't financial advice but more importantly b) you have to invest in a fund within the account otherwise the money is sitting idle.
Like that car across from your house every night. Just... watching... Waiting. Backs away slowly.