How to repair a greeting that has already gone wrong
The recovery is nearly always smaller and easier than the fear of attempting it suggests.
The instinct after a fumbled greeting is to pretend it did not happen and hope the other person is doing the same. Sometimes that works. More often it leaves both people carefully not mentioning something they are both thinking about, which is a poor footing for anything. The alternative is not an apology, which makes the moment heavier, but a light second attempt. Starting the greeting again, a little more slowly, with a small acknowledgement in the tone that the first one got tangled. It takes about as long as the original and almost always lands.
What makes repair work is that the other person is usually relieved. They have their own version of the same worry running, and somebody has now taken responsibility for the moment so that neither of them has to carry it privately. This is why a small laugh does so much. It is not the laugh that helps, it is the shared admission that the choreography went astray and that neither party regards this as important. Once that is on the table, the terms can be reset to whatever they should have been, and the encounter continues from there without a limp.
The one repair that consistently earns more than it costs is asking again. Asking for a name again, asking how it should be said, asking whether you have understood something correctly. There is a widespread fear that asking twice reveals that you were not listening the first time. In practice it reveals that you intend to get it right, which is a far more valuable piece of information about you, and one that people remember with warmth long after they have forgotten that anything went wrong at all.