State tax filing

Thank you. I though this might be the case.

In 2020, I cashed in $9008 total value of USSB where $4000 of the total was the original principal and rolled the whole $9008 into a 529 plan for my daughter. I did not treat that $4000 as a tax deductible contribution.

So that means I should be able to be file an amended 2020 return and deduct up to the limit allowed for that year and then use what it is left as a carryover deduction to an amended 2021 WI State Return?  I think that would get me a some more refund back if went through the trouble of doing two amended returns for those two years?

Thank you so much for your help!