Would a loaded cartridge ignite/explode when hit from the side or front by a bullet? This question https://physics.stackexchange.com/a/193472/93888 explains what would happen after a cartridge is ignited: the bullet gets propelled by the gases in one direction and the cartridge (with the person, in the case of the question) in the opposite direction.

But would a cartridge explode/ignite if hit from the side (the rear part where the gunpowder is, not the side of the bullet) or the front by a bullet? Or is the rear the only side able to start the reaction?
Maybe

Unfortunately, the correct answer is “it depends.” Small arms cartridges struck by small arms projectiles generally do not ignite – but they do sometimes.

The issue is quite important in the armed forces. If you come under enemy fire, the last thing you want is for a near miss to cause your own ammunition to explode. There has been formal research on the subject for decades. However, it can be quite difficult to prevent.

There are formal test protocols to assess the safety of new ammunition types, and they can involve munitions struck by a range of different “stimuli” from various distances, points of impact and angles. Depending on the exact set-up, the response can vary from 100% explosion to barely scratched.