my truck takes a few seconds to start
If the hard starting only occurs after the truck has set for a while or over night the fix may be simple. Replacing the spark plugs may be all that is needed here. Regular spark plugs tend to need replacing every other year on fuel injected engines. Where double platinum spark plugs will last about 100,000 miles. This is quite common for this year of truck.
If it is easier to start with applying the gas pedal then you may have a sticking Idle Speed Control.
And of course if the check engine light is on this may indicate a failing engine sensor.