Sounds like what you want is a switch to sense when the garage door is open and have a period of run time after it is closed.
Sounds like you would also like a switch in the space to cycle the fan.
Example micro switch
https://www.amazon.com/Uxcell-a11021800ux0120-Switch-Straight-Action/dp/B0050HKB8O/ref=pd_lpo_328_lp_img_4?ie=UTF8&psc=1&refRID=Y7GAGDYT9KRCEGMV66AB
A small multi purpose relay would handle that load easily.
Relay 110/120 VAC Coil Voltage PR341 Mars Relay 90341 [PR341]
If you want it to remain on for a period of time after the door closes, an inexpensive delay on break relay would keep the fan energized for a given amount of time.
Delay on Break Timer Time Delay Relays - Littelfuse
The end switch on the door and the wall switch would be wired in parallel to energize the delay on break timer. The delay on break timer would then energize the fan relay to start your ventilation fan.
Components for this would be available at any HVAC parts store.