There's a popular complex question "whether the chicken or the egg came first" and hopefully I will answer this question.
Firstly we know that evolution is a gradual process and it happens with small variations from generation to generation and so the modern chicken's ancestors are south east asian red jungle fowls which in and of themselves descended from dinosaurs, so technically the genes that modern "chickens" have can be traced back to dinosaurs which makes the answer a lot more answerable, cells came first, then cell division occured then gradually dinosaurs came before their "eggs" came but if ur asking about the broiler chicken that we generally refer to as THE CHICKEN then the eggs came first because the last visibly or genetically differentiable ancestor of the chicken gave birth through an egg from which the first chicken came out of. Now ofc i can be wrong but that's my opinion:)