There are so many things that can cause a P0171 fault code that to hazard a guess here would be more confusing than helpful.
I can tell you that a good technician with a proper scan tool (think thousands of dollars) could drive your car for a few miles, record some data, and be 90% sure of where the trouble is before even leaving the driver’s seat.
A mechanic that will tell you “it may be a catalytic converter” without even running some tests is like a doctor saying “you may need surgery” before even getting you into the exam room.