You make a joke about a friend running late, and they tell you the bus broke down while they were taking their child to school. You have enough information to respond directly. “I’m sorry I made you the punchline. That was a rough morning.” Then give them room to answer or move on.
If all you noticed was a quiet moment, you can check in privately instead of asking the whole group whether your joke was funny. Try, “I’ve been thinking about what I said at lunch. How did that land with you?” Listen to the answer and respect it if they’d rather leave it there.
Practice a short apology with someone you trust, or search “how to apologize for a hurtful joke.”