Humor is perspective with timing.
REFLECTION
REFLECTION
Two things have to arrive together for something to be funny. You need the sideways angle on the situation, and you need it to land at the moment the room is ready for it. Either alone falls flat. Which means a sense of humor is not really a personality trait but a form of attention, watching closely enough to see both the other reading and the right instant to offer it.
Notice what happens when you have the funny thought and hold it a beat too long, or release it too early. The timing is trainable. Mostly it improves by listening more and by caring more about the room than about being the one who said it.
When has your joke landed badly only because of its timing?
Free, with nothing to buy inside it.