I had a ford XLT f150 with motor 4.6l but idle terrible don't run what i do?

I had a ford XLT f150 with motor 4.6l
but idle terrible don't run what i do?

Its most likely one of four things.#1)The IAC valve is dirty or defective.#2)The EGR valve is dirty and stuck in the open position/it has a pin hole in the diaphragm/its gasket is leaking.#3)A vacuum leak is present.#4)The MAF sensor is dirty. You can clean the egr valve and iac valve with carb cleaner. You can clean the two heated wires inside the maf sensor with maf or electrical cleaner only. Check for vacuum leaks by letting the engine run, spray carb cleaner on every gasket, vacuum hose, and vacuum operated component. If the engine idle suddenly surges up or the engine stalls, you've found the leak.