When are withdrawals subject to taxes? A bit confused

Let’s just say I’ve contributed $5000 per year for five years into my Roth IRA and put them all into a few index funds.

It now has $25,000 plus whatever earnings. Let’s just say $30,000 in total.

If I withdraw $30,000, I am taxed on $5000, correct? But what if I withdraw $25,000? Am I taxed at all? Or does the amount you can withdraw have a year limit like contribution limit? In that case I can only withdraw $5000 per year without paying any taxes?

if I withdraw $25,000, Will there be a section on tax return, where I specify that the withdrawal I made is not subject to tax? Or will I not even have to tell the IRS? Or Fidelity will not send me any forms because they know these are not taxable?

The same question for individual brokerage account, in case the answer is different for that.

I think I’m having trouble with the concept because these numbers do not represent money, but their value in stocks. So, when they withdraw, I am selling them…

Thanks for the help