An emergency fund is money you can spend without selling something and without asking a lender. The bill it is meant to meet is the one that does not wait: a repair, a medical invoice, a month when the paycheck is late.
People argue about the right number of months. The argument is local. Rent and a car payment are not the same as a paid-off house. There is no universal multiple. What matters is that the fund fails if it is invested in something you cannot sell on the day you need it.