Hard to crank

I have a 2000 chevy impala that I recently changed the plugs and wires in. It is hard to crank when you first try,but when it does I have no problems with it the rest of the day. It also has a check engine code P0171 on it. Would a 02 sensor call all of this problems or is it something deeper more deeper than this. Please help.

Was it hard to crank before the plug/wire change? O2 sensor won’t affect cranking at start. How old is the battery? Clean battery connections?

P0171 is “fuel trim system lean bank 1”.

When you say “hard to crank”, do you mean hard to actually turn the crank or hard to get the engine to start?

When you start the engine cold the oxygen sensor signal is bypassed to allow the engine to run rich. An oxygen sensor will not cause your symptoms. The code could, however, be being set when the engine is running and not be related to the hard starting. Or, if the fuel pump is dying or the filter plugged, and the fuel pressure is subsequently low, it could be related to the hard starting.

I’d start by checking the fuel line pressure. You may have a dying pump.