Sounds like a burnt out bulb. Replace the headlight bulb.
I tried that and still had the same problem and only worked when I turned rhe brights on
Search Ford Ranger Questions
Ford Ranger Experts