What you want to do can probably be done with any Arduino/microcontroller like an Arduino nano. I recently got one of these things from Amazon, which will do everything you want with only a speaker and power source, but it's a tad large for a keychain.
You can use a module like this, which has internal memory that you load mp3 files onto. These MP3 files are named 001, 002, 003, etc. The module has a set of pins on it, that when energized will play the corresponding file name out it's Aux jack, which would either feed into your stereo or though a separate dedicated speaker.
The crudest, and perhaps most simplest way to control this is limiting your choice to one sound or two, and using relays to activate the pins with whatever 12V source you have when the vehicle starts, engages an certain implement, whatever. I've used this solution in the past, the only draw back is it requires a little bit of tinkering and electrical experience to pull off, although not much.
https://www.amazon.com/dp/B07XRB72H9/
There may be a better, more turn-key solution out there but I am not aware of it.
You could potentially do this with a PIR sensor and a $10 mp3 playback module like this one: