Welcome to the forum
Engine shouldn't stall if cam sensor stops working, so the most likely scenario, is that the Cam synchro unit(oil pump drive) failed, gear roll pin broke maybe, and then the CEL(check engine light) came on indicating no Cam signal
Then the engine slowly lost power as main bearings heated up(oil is the coolant, not just for lubrication), slowly is a relative term here, could be under a minute
Then engine stalled and bearings are now welded to crank and journals so crank can't be turned
Yes, engine is toasted, can be rebuilt but might be less expensive to find a used 3.0l Vulcan engine
1999 to 2008 would be best, from Ranger or Mazda B3000
2WD or 4x4 don't matter, and manual or automatic also doesn't matter
Avoid 2004-2006 3.0ls because heads can be bad, exhaust valve issues
You will probably need to swap over some of your 2006 external parts to the used engine to match your 2006 wiring plug ins, thats done by a piece by piece check
car-part.com is a good place to check prices in your area for used car/truck parts, including whole engines