excess contribution removal of a ROTH IRA

I accidentally opened up a ROTH IRA for tax year 2024.  Being a stupid college student I thought you could just open up a ROTH ever year with your savings but later told that it had to be earned income.   Luckily I found this out earlier this year in January and did an excess contribution removal.   So i had to sell off the 7000 i placed for tax year 2024 and 1700 dollars in profit made from that money.   I am using turbo tax deluxe and confused when they asked me if i opened up a ROTH IRA for 2024.  I assume since i did a excess contribution removal, i say NO to if i opened up  a ROTH.     The question is when will I get tax for that profit that i made from selling off the stock and sending that back to my investment account $1700 profit ( 8700 total withdrawal- original 7000.)

will i get taxed for tax year 2024 or the following tax year in 2025.   I was also told that since I am still a student and make no income, I should fall under category where I do not have to pay taxes since with  interest made from bank accounts and selling off stock, I only sums up to no more than 3 to 4 thousand.