401K and IRA contributions

Last year, I contributed to a 401K til March, 2021.  I stopped contributing to it because I left my job, and instead started to contribute to an IRA, since I couldn't join my new company's 401k.  When doing my taxes, it said my IRA contributions were not deductible because I had a 401k.  But I wasn't in a 401k all year--just the first quarter of 2021.  Is it correct that my IRA contributions for the rest of the year are not deductible, even though I was unable to save anything in a 401k?