Jokes are delivered with the intent of entertainment and with the desired effect of laughter. Punchlines are typically used to end a sentence with humor. An easy way to create a joke is to think of a subject and a scenario where the subject executes an unexpected and related action. To deliver punchlines effectively, the action should associate with the subject's opposite.
Let's use the subject, "a good mother" to practice creating a joke with an effective punchline. We will keep in mind that the subject, "a good mother" should execute an action associated with its opposite. To me, the opposite of "a good mother" is "a bad father." Now think of an action a bad father would do. Since mothers and fathers are sometimes found in marriage, the scenario of the joke I will make is the introduction to a marriage proposal. Here is the joke and punchline I came up with:
Boyfriend: "I think you would make a good wife because I can tell you would make a good mother."
Girlfriend: "Of course I would make a good mother! I would pay child support on time every month."
The punchline, "I would pay child support on time every month" adheres to an action that is associated with the subject's opposite, which is a bad father who does not pay child support on time every month.
For any joke to have an effective punchline, the element of surprise must be applied. Jokes usually set-up a scenario where your audience expects one result, and then the punchline reveals something unexpected. If you deliver a punchline that is an action associated with the subject's opposite, it is likely your joke will ensue laughter and be successful.