"Tap rack bang" (below copied from wikipedia, and I'm just as surprised as you are that they have an article on this.)
Tap, rack, bang (TRB) or tap, rack, and go (TRG) is jargon for the response to a failure to fire in a firearm with a removable magazine.[1] This is designated as an "Immediate Action" and involves no investigation of the cause (due to being under fire in a combat or defensive situation), but is effective for common failures, such as defective or improperly seated ammunition magazines.[2][3]
Tap โ to tap the magazine. This is to ensure that the magazine is properly/completely inserted in the firearm so that it feeds properly. As typically taught in tactical firearms courses, the "tap" is applying pressure on the floor plate of the magazine to lock it into place. It does not constitute 'smacking' the magazine, as this can irreversibly damage the magazine's lip.[4]
Rack โ pull back sharply and then quickly release the ~~cocking~~ charging handle/slide of the firearm.[5] This will eject a misfired round, which could be a possible cause of the stoppage, and to chamber the next round.
Bang/Go โ aiming and firing the firearm again.[5] If the firearm again does not fire or fails to extract the spent round, it may indicate a more serious problem with the firearm, requiring maintenance. For instance, if the firing pin is too lightly striking the primer on a cartridge, it may indicate a worn-out spring or firing pin.
Some failures, such as a "stovepipe", require more complicated maintenance that requires investigation of the underlying problem, or remedial action.[2] With issues such as a squib load or hang fire, the "tap, rack, bang" procedure should not be used.[6][7]
And of course
if the firing pin is too lightly striking the primer on a cartridge, it may indicate a worn-out spring or firing pin.
Some failures, such as a "stovepipe", require more complicated maintenance that requires investigation of the underlying problem, or remedial action.[2] With issues such as a squib load or hang fire, the "tap, rack, bang" procedure should not be used.[6][7]
A second mag wouldn't fix any of that, either, so adding one wouldn't be a solution.
Finally if the problem is the mag (feed lips or worn spring), a tactical reload (removing the mag, retaining it, and swapping to a full one) would be the move if you can, or just lose the mag and insert a new one if you can't.
The real solution to OP's question though is "train reloads," before you get into a gun fight. In a situation with high stress you want to have practiced it enough that it becomes muscle memory and you can do it without really thinking about it. You can train it in your bedroom without ammo no less, no excuse not to train reloads. If you're really bad you can add an aftermarket magwell to many guns that make it easier to reload (at the cost of concealability).