Excess Roth IRA Contribution - how are earnings treated?

Single Filer. I contributed $100 to a Roth IRA account in Jan 2024 for tax year 24. The contribution is ineligible because I will earn well above the income threshold for Roth contributions. The account has grown to ~$10,000 (which consists of $100 contribution and $9,900 in gains from stock trading).  

 

I plan to complete a return of excess contribution of the $100 and pay the $6 penalty. Am I required to withdraw the entire account value, or just the excess contribution? If I only withdraw the contribution of $100, are there any penalties for leaving the gains (e.g. the remaining $9,900) in the Roth? I understand I will need to pay taxes on this value once withdrawn unlike normal Roth IRA withdrawals, but I am trying to understand the downside of leaving gains in the Roth for future tax years, instead of withdrawing the complete value of the account in tax year 2024.