You can pull money out of your Roth IRA at literally any point. You already paid the taxes on it.
You cannot pull more out than you put in though. If you have and properly use a Roth IRA throughout your whole life, you can live for many many years without ever breaching that cap if you wanted to retire a little earlier. You’re just reducing your potential total.