If you hear rattling sound coming out from your car hood especially when the car is idling or goes over potholes, most likely the culprit is the latch assembly. Needless to say if you are lazy to do it yourself, or your car knowledge is limited to only pumping gas at a gas station, or if you prefer to pay a mechanic handsomely, instead of me, to fix the problem, take your car to a workshop by all means.
Let me show you how to do it yourself. Open up the hood of your car and you can see the latch assembly right next to the hood release lever.
Check the two securing nuts next to the coil using a ring spanner and also the pin using a flat-headed screwdriver. If you can't secure them fully, remove and replace them with new ones. Mark the positions of the nuts before removing them. Note that the mounting holes are slotted for adjustment if necessary.
When the latch assembly is removed, it looks like this.
Take out the components and clean them with degreaser.
Refitting is a reversal of removal. Make sure the nuts are tightly secured.