Step one in vibrating environments is taking care of your wire ends, such as hinted at by Spehro.
If you solder or spread out the inner conductors they become effectively one or more individual wires with very limited strength and vibration resistance. This is why professionals crimp all their terminals and if really important use a ferrule around the cable and then crimp that. (A well chosen ferrule will keep the wires relatively well grouped, even when very forcefully crimped afterwards).
After that, you need to be worried about the outer sheath of your wires vibrating along a rough edge. Either you need to prevent that, by use of many support points, or you can harden the wire bundle against it with reinforcements.
Once you are at that point, you need to start considering wire size and stranding.
For automotive they may set a silly standard as "AWG24 and no less", but that is more probably because of the limited insights into the matter in some parts of the industry. (Easier to tell garage personnel to never buy less than AWG24, than to explain the finer points).
The more sensible rule, however is the one seen in Spehro's answer: No fewer than X or Y strands for N or M amount of vibration force. Of course many different kinds of definitions and specifications exist for minimum or maximum vibration force in any kind of system, so this may quickly get cloudy, again a reason to just say "AGW24".
To expand a bit on mkeith's comment: The thicker a copper rod (wire or otherwise) the more distortion a bending force will create in the material. The more distortion accumulates the quicker the metal will fatigue. If you have an infinitely small wire, it has infinitely little distortion at a sharp angle. In fact, chip bonding wire, which can be as small as several or dozens of micron, can sway in the wind bending and vibrating without snapping for a very long time.
So if you want very flexible and very long lasting wire, you're looking for a wire made up of as many tiny strands as you can find.
A usual thing is 0.06mm buildup of wire with a silicone or teflon sheath for extremely high flexibility and vibration resistance. As well as high temperature performance. But the same wire make-up exists in PVC or PP wire, or wire wound, or glassfiber reinforced silicone. With such tiny wires you get the 19 stands Spehro mentions already at AWG28, with the added luck that the thinner strands will give you an extra margin, as discussed above.
Be careful with Silicone or other soft plastics, though, as this is much, much easier to damage with small sharp edges. Many automotive solutions only allow soft plastics within safe areas, where the wires get wrapped in glassfiber reinforcement sheaths when they get routed along hard and sharp surfaces that may rub along them.
If you have very thin strands, you can have thinner wires, because the metal fatigues much less the thinner the strand is. So if you have normal 7 strand wire at AWG24, that may well loose from 19+ strand AWG28 wire, vibration wise.
But before you start thinking about the thickness and stranding of a wire, you need to think about safely terminating the ends of your wire, in no case use solder joints to start and about damage to your wires caused by rubbing and cutting along hard edges.