Get your taxes done using TurboTax

Your hunch is correct.  You should amend your 2022 tax return.  The 1099-R you will receive from the 401(k) administrator in Jan 2024 will have a Distribution Code P in Box 7 (Excess contributions plus earnings/excess deferrals (and/or earnings) taxable in 2022.)  See page 7 of the 2023 1099-R, linked below.  

https://www.irs.gov/pub/irs-pdf/f1099r.pdf

 

I found this answer to an earlier question.  It was on a 2018 excess contribution with a 2019 1099-R with a Distribution Code P

https://ttlc.intuit.com/community/taxes/discussion/1099-r-code-p-what-to-do/00/1442903

Level 15

A code P on  a 2019 1099-R means it was a 2018 excess returned in 2019.   The excess must be reported as returned wages on an amended 2018 tax return.  Entering the code P in to the 2018 software will ask if it is a 2018 or 2019 1099-R - say 2019 and the box 1 amount will be added to the 2018 1040 line 1 as wages.