There’s that wonderful old joke about a chicken and egg have just made love, and they’re lying there having a bit of a post-coital cigarette. The chicken says to the egg, “Well, that answers that old question”.

Edit: Can’t find the video with that whole segment, but to answer the question in the title: Like the punchline, the egg came first. Egg laying animals existed long before the chicken evolved.