Amended 2023 resulting in excess Roth per form 5329

Hello community!
First time inquirer here.

I am in the process of amending the 2023 tax year to correct (lower) the carryovers.  This process is causing the income to be higher.  Due to this, my wife and I now have excess contributions per form 5329 (line 24) and the penalty (line 25).  In 2024 tax year (we have not filed), we cannot contribute to Roth.  My question is:
1. I understand that it has passed the cut-off for tax year 2023, so we are responsible for the penalty.  Does the 2023 1040-X amount owe already include the penalty?
2. If so, then we only need to withdraw the excess per the form 5329 line 24?  No need to worry about the earnings?

I hope tax gurus can give us some enlightenment.  

Thanks!