Roth IRA

After filing our 2024 return we found out that the Roth IRA contribution we made in 2024 isn't allowed due to our AGI being over the limit.  We removed the funds plus earnings from the account and received a 2025 1099R.  Do we need to amend our 2024 return and pay the penalty or wait until 2025 to file and claim the penalty then?   Thak you.