Get your taxes done using TurboTax

Contact the IRA custodian and request a return of contribution + the earnings.  This will happen in 2023 and will be reported on the 2023 return.  On the 2022 return simply don't enter the ROTH contribution since you are reversing the error... OR  indicate the excess will be removed ... either way is correct.