Rattling noise coming from passenger side possibly engine when going up steep hills, for ranger?

I ave a 2007 ford ranger and recently when going up hills there has been a rattling noise that seems to come from the passenger side towards the engine or front of the truck. What could cause this? I also recently had an oil change, and they put 5w30 in instead of the recommended 5w20, could any of this be a cause?

Thanks for the help!

Oil has nothing to do with it. It sounds like something is loose. Check the exhaust pipe. Just reach under the car, after it has cooled, and see if you can shake the exhaust pipe.

Cheap gas, pre-ignition?

The only factor you mention is steep hills.