Heat attracts them...
particularly this time of year. Among old car hobbyists a particularly horrible event is when mice find their way into the tailpipe and, if the car sits long enough, they can set up housekeeping in the cylinders. Mouse pee a particularly nasty and corrosive substance.
One solution to this type of mouse problem is to slice into an old tennis ball and slip it over the tailpipe. To catch the one in your engine compartment, I'd leave the car for a day or two, put one of the "roach hotel" baited mouse traps on the ground under the car (and near where the mouse appeared). See what happens. Good luck.