IRA deduction limits for recent retiree

I retired at the end of December 2023 with a company where i participated in a 401K plan.  However I received my last pay check in January 2024 and it included my normal 401K pre-tax contribution.   Does this mean I'm considered an Active Participant in a 401K plan for 2024 even though I retired at the end of 2023?   I have a separate traditional IRA that I would like to contribute to in 2024 from earned income I have in 2024.  But, will I be subject to the MAGI income restrictions ($143K for Married filing joint) If I want to deduct my 2024 IRA contributions from my 2024 income because i had that one paycheck in Jan 2024?