Why does my 2000 ford ranger loss power and start clattering?

Why does my 2000 ford ranger loss power and start clattering? - 1

Without inspection the two common causes would be Overheating or
Loss of oil pressure

It's also missing

There are probably several things that are worn down and you might start with all new parts == plugs, rotor, wires, and a new coil… Then get a pro to adjust the timing === you may even need to replace the timing chain/belt == all the above will get you better MPG's and increase power…

Far too little information to determine which of so so many possible reasons that this is happening