Almost reads like a clogged up exhaust system.
You can test for this with a vacuum gauge.
Or have someone rev the engine while you feel the exhaust flow out the tail pipe, not too exact, lol, but sometimes you can feel the flow is not matching the rev ups.
Cat converters can start falling apart inside which slows exhaust flow, this back pressure prevents intake fuel/air mix from coming all the way into a cylinder, as RPMs go up so does back pressure, you are not getting all the new fuel mix and so it just limits rpm from going higher quickly.
Sparking timing is done by the computer so is more exact than vacuum advance systems.
This is usually done by using a Cam sensor, so computer knows exactly where each piston is relative to it's TDC(compression stroke)
If you have a timing light you can hook that up to #1 spark plug and see if timing is changing when engine is revved up.
Could also be fuel pressure.
Pressure at the fuel rail/injectors should be 60psi, if fuel filter is clogged up this can lower pressure, and cause limited power.
Also fuel pump could be going out.
Fuel filter is about $10, so if you have no history on this truck then I would just change it as preventive maintenance.
If you can rent or have a fuel pressure tester it might help diagnose the problem.