Car bulbs typically last anywhere from 450 to over 11,000 hours, depending on the type of bulb you buy.
Start by making sure you buy quality car light bulbs. Some low-quality bulbs are so fragile that any power surge can damage them. That doesn't mean you need to spend money on car light bulbs. There are many affordable options on the market from quality manufacturers.
A loose connection in the bulb holder can also cause the bulb to burn out. This is because the circuit is not done as tightly as it should be. You should check the connections in the light socket to determine why the bulb burned. Check the wire connections and the tightness of the connections in the switch. Make sure the power is off before doing these checks.
Also, a loose spring-loaded connection requires current to arc across the contacts -- too much heat can burn the bulb. You can check for a loose spring-loaded connection by checking the contacts on the bottom of the bulb. If there are dents, the spring-loaded connection may be loose. The arc current can melt metals that come into electrical contact. When the bulb is continuously exposed to the arc, tiny dents are formed.