Yeah, asking what you said is key. To really figure it out, you gotta pick apart the joke word for word. Was it about their job, their look, something they're sensitive about? Sometimes it's not the topic but your tone that landed wrong.
Pick apart the joke word for word" is exactly what I do, and then I just feel worse. I mean, my brain will replay my own dumb tone on a loop for days. Maybe just ask them, because the waiting is the worst part.