I don’t think you can learn a sense of humor. Things that help you have humor are knowledge, as sense of playfulness, and a sensitivity to others. You can become more knowlegeable by reading a lot and learning a lot. You can become more sensitive to others by studying people, and learning the non-verbal cues that people provide. You can even learn to be more playful by taking creativity classes.
Humor is about making unexpected and absurd connections. It often involves manipulation of symbols, especially word play. To get humor, you need to think of lots of associations with words and images. You have to do this quickly. You have to detect when someone says something that doesn’t make sense in context, and quickly bring up another context they might be referring to. Thus you can see that humor is intended and respond to it.
Certain kinds of people have difficult with humor. People who can not read other people or aren’t very empathic have a hard time with humor. Autistic people have difficult with humor, as do those with Aspergers. Uneducated people have trouble with humor. They often don’t know enough to pick up on others’ jokes. And people who don’t like to play will be in trouble.
A serious person can have a sense of humor. I am told I am funny even though I am a very serious person. I do like to play. But if I didn’t, I don’t think I’d be able to be funny. I spent a lot of time learning to read people, and learning to understand how to say things so people would laugh. My specialty is shaggy dog stories. Or wry and dry humor. I’ve spent a lot of time working on it.
So, possibly, if you work on it, you could learn it, but only if you are educated and playful and sensitive to people. If you have to learn all those things, it is going to be difficult to get a sense of humor.