After you file

after tax due date including extensions: you distribute the excess amount being carried forward on 5329,
(or offset it with currently allowed contribution) .
An amended return will be needed supplying Form 5329 since there is a 6% penalty per year on excess contributions .
Earnings stay in the Roth account.

 

This applies to 2021 and 2022, and 2023

since your excess remained in the account through 2023.

 

Resolution of the excess now would be reported on your 2024 tax return.

 

@ww_94