Recommend some books on humour theory.
On how to write good jokes.
>>7599703
https://www.psychologytoday.com/blog/the-second-noble-truth/201302/the-jokes-who
http://www.medieval-life-and-times.info/medieval-life/medieval-jesters.htm
>>7599703
Watch a lot of stand-up.
Read And Here's the Kicker, Poking a Dead Frog, and Sick in the Head.