I'd start with the basic cheap stuff. Replace the fuel filter. Inspect, regap or replace spark plugs. With the truck running, pull the coils one at a time and see if they all work or if one ha no effect when it's pulled, that's the bad one. There will be vacuum leaks. Take your time and find them all! Replace the pcv valve. Remove and completely clean the throttle body. Run a can of Sea Foam with a full tank of gas. Rent a free code reader form Autozone, and it will tell you more than any cheap reader online will ever tell you! It'll give you codes you may have that cheap readers will not pick up. Clean the MAF sensor only with MAF sensor cleaner. Clean the egr.
Everything I've mentioned is either free or very cheap to do yourself. After having done all this on a truck you have ZERO history on, it should run much better, with more power. Will it fix your issue? Hard to say since we don't know the cause yet....