kbuskill
***CAUTION*** I do my own stunts!
I think it's the Power and the Ground that I would like to see. Like I said, I'm not too savvy on the electrical work, especially in a vehicle. I can change a light switch or a plug in a house, but past that....
You need a tilt switch... something like this...
https://www.amazon.com/NORMALLY-OPEN-CLOSE-TILT-SWITCH/dp/B073HNMCMN
Attach switch to hold securely so that it doesn't bounce around and cause your light to come on with the hood down.
One side of the switch goes to the positive lead of your new underhood light. The other side goes to the power coming out of the fuse tap/fuse box.
Get a fuse tap like this...
Tap into the underhood fuse box here...
Fuse number 37 front wipers 25A.
Ground to just about any bolt under the hood.