Edit: This felt like a deja-vu for me...... it turned out that gave advice like this on a waaaay older thread
To make comedy, the first key is to find your types of humor. The ones you like and entertain you.
There are many types of humor:
relatable humor,situational humor, surreal humor, puns, cringe comedy, antihumor, black comedy, sarcastic humor, parodies, physical comedy among others.....
Your humor may combine many of these kinds. And that will build your comedy style. Is important to note that you may have different stories with different kinds of humor. Ex: You may not use black comedy in a more lighthearted story.
Timing is key to make a joke funny: Is important to have a set up, to build up the joke and a punchline, which is the moment of truth in the joke.
Jokes play with the audience expectations, either by subverting them, or by subverting the subversion by playing the jokes straight. You could even subvert the subversion of the subversion, but that is going on another plane.
Exageration makes things funny too. Either an overreaction, or even and underreaction can make a joke.
Also, watching good comedies can help you too.
Hope this helps!