Retirement tax questions

Thank you ThomasM125, I appreciate the quick response.  I had made contributions in 2023 as well before (and even after) the withdrawl, but it sounds like the IRS doesn't take that into account.  I will calculate the end of 2022 and proceed.  Thank you!