Think of someone standing on a stationary skateboard who suddenly pushes a heavy box away from themselves.
The moment the box moves forward, the person is pushed backward on the skateboard, even though nobody applied an external force to the person directly. The only reason the person moves is that the box pushed back on them exactly as hard as they pushed on the box.
Firing a gun is the same situation: the expanding gases push the bullet forward, and by the very same interaction, the bullet and gases push back on the gun with equal force, causing it to recoil. This is not something the first law, motion without applied force, or the second law, force versus acceleration of a single body, can explain on their own, it specifically requires a pair of equal, opposite forces acting on two different bodies.
Therefore: \[ \boxed{\text{Newton's third law of motion}} \]