The filter is step one, not a detail
A dirty filter chokes airflow across the whole system. The evaporator coil needs steady airflow moving past it to stay warm enough to avoid icing over. Once ice builds on that coil, it blocks airflow further, and the system starts cooling worse while running longer to do it. A clean filter is the cheapest thing protecting the coil.







