I'm working on a panel survey. I have a binary y dependent variable measured three times, once before a particular event, once immediately after the start of the event, and a third time a year after. The variables I have: A dichotomous dependent variable was measured three times: y1 y2 y3. in addition, I have - Continuous independent variable (IV): x Continuous covariates: z1, z2, z3, z4

I want to test whether the IV variable x affects the change between y1 and y2 (immediately after the event), as well as between y2 and y3 (a year after the event), and between y1 to y3, while controlling the covariates (z1-z4). To sum up, I'm interested in the effect of x on y along time, and I want to understand whether it affects differently immediately after the event and one year later.

Any ideas on which analysis should I use? And how to write the code?
Thanks!