Could be "fan belt" and a bearing starting to go out.
With engine cold remove/loosen fan belt
Start engine, battery light will stay on, thats OK
Rev engine, see if noise is gone
If so shut off engine and spin each pulley to find the one that makes noise.
If noise is still there most likely cause is the Cam synchronizer, known issue on the 3.0l
Shut off engine
Read here: Ford Ranger 3.0L Camshaft Position Sensor
Do NOT run cold engine for more than 4 minutes without fan belt