What is the first part of a joke called?
The first part of the joke is the setup, a general question or observation which offers an opportunity to give the punchline in response.
The joke is the setup and punchline combined, as either on its own is not inherently funny, in contrast to a one-liner. To the setup and punchline may also be added tags, additional punchlines using the same setup, and toppers, additional punchlines which use the entire earlier joke as a setup.
Set-up is what professional comics/writers call it. Here in the UK some also call it a feedline
as opposed to punchline
.