Excess contribution to Roth IRA in 2023

Hi, I've reviewed answers to this question but still need some help.. I made an excess contribution to my Roth IRA in 2023 and withdrew the excess and earnings in 2024, prior to 4/15/2024. I have now received a 1099-R for 2024 showing the gross distribution and the earnings as taxable amount (Box 2a).  I was older than 59 1/2 at the end of 12/31/2024. I'm amending my 2023 taxes but adding the earnings as income creates another excess contribution in 2023. Do I need to have another excess contribution and earnings removed? or can I leave this in my IRA and apply to 2024? is there a penalty? and what forms do I use? If this is a Roth, and I'm older than 59 1/2, is it taxable earnings? Thanks so much for help!!