It could be a loose radiator grill, license plate holder or similar. It could be a loose cap in the engine compartment or even a problem with the engine.
Worn Ball Joint
if its a front wheel drive vehicle then it could be the axels
I would have your exaust pipe looked at, it might be loose, or might even be missing a bracket.
Could be a worn out shock or wheel bearings. Is it 4 wheel drive?
You might want to have the CV joints checked. When bearings start to go out, they make a "clicking" or "rattling" noise while driving - especially while making turns.
I'd like to know too! Mine does the same thing - it makes a rattling noise upon startup that goes away after 30 seconds or so and isn't present while driving or idling.
bad transfer case
Possibly bad wheel bearing.
It needs an front end alinement or your tires & wheels need rotated
realignment, 60 to 80 bucks
Rattling under the hood can be something easy to fix to something bad. It could be loose bolts, bearings, pulleys, or it could be interior in the motor.
Probably your brake pad came off.