I changed the fuel pressure sensor and the fuel pump and I got these two codes
1. Vacuum Leaks
This is the most likely cause of too much air being taken into the system. The source of a vacuum leak could be one of many things, including (but not limited to) cracking, wear, or a hole in any of the following:
If any of these parts are not forming a perfect seal (have a slit in them) then unmetered air will be entering the engine. Try to listen for a whistle or hiss under the hood with the engine running and visually inspect all hoses and connections.
Example of cracks in an air intake boot causing P0171 and P0174 codes
2. Mass Airflow Sensor (MAF)
The MAF could be under reporting the amount of air passing through the intake. This could be caused by a dirty or fouled MAF or the MAF could be defective also low fuel pressure