IRA contribution without earned income - fixed before filing taxes 2023

I had to return/withdraw my 2023 IRA contribution (traditional) - that I made in January 2023 for 2023. I realized that I had no "earned" income.  January 2024 when doing my taxes I withdrew the original amount plus some calculated earnings which I did (full year on that amount). After reading something here on how to handle this on my 2023 tax return - I am now confused. Fidelity won't issue any 1099 for the tax year 2023 because it happened in 2024.  Should I wait until 2024 to deal with this or print off my own self reported 1099 filled out showing the distribution, earnings etc.  The contribution was January 2023 and I am fixing the mistake in January 2024. Thank you.