Common Causes of P0171
P0171 usually means the engine is running too lean on bank 1. Common causes include vacuum leaks, unmetered air entering the intake, low fuel pressure, a dirty or faulty MAF sensor, or oxygen sensor readings affected by another issue.
The best starting point is usually checking fuel trims, intake leaks and airflow readings together.