The expression “to strike while the iron is hot” means to act at the most fitting moment; to seize the most favorable opportunity.
It was, of course, the blacksmith who was originally so exhorted.
If he failed to swing his hammer while the metal on the anvil was still glowing, nothing would do but to start up the forge again and reheat the iron. His time was lost; the opportunity for effective work had passed.
Figurative use is very old. It is found in Chaucer’s Canterbury Tales, “The Tale of Melibeus,” (1386) : “Right so as whil that Iren is hoot men sholden smyte.”