A possibly embarrassing situation can be at least in part remedied by a solid understanding of Rule 6, Playing Ball from Teeing Area.
If you make a stroke at the ball and whiff, or barely strike the ball and it remains within the teeing area — the imaginary box that exists between the tee markers and two clubs lengths backward — you have a few options under Rule 6.2b(6).
The Rules states, “if the player’s ball in play is in the teeing area after a stroke (such as a teed ball after a stroke that missed the ball) or after taking relief, the player may lift or move the ball without penalty, and play that ball or another ball from anywhere in the teeing area from a tee or the ground under, including playing the ball as it lies.”
You still need to count the stroke you made at the ball with your first swing, but under this rule, you’re able to re-tee the ball and hit your second shot from the tee box in the same way you attempted to tee up and hit your first shot.