if you took out no more than your own remaining contributions, you can do so without penalty.
It depends, if you qualify to be a first-time homebuyer and you had no present interest in a main home during the 2-year period ending on the date of acquisition of the home. If you are married, your spouse must also meet this no-ownership requirement. Please see IRS First home for more details. If you qualify then you do not have to pay the 10 % early withdrawal penalty on up to $10,000 (if you are under 59 1/2).
Please be aware, you can withdraw contributions you made to your Roth IRA anytime, tax- and penalty-free. Only the earnings will be taxable. Please answer all follow-up questions carefully and make sure to enter net contributions prior to 2021 on the "Enter Prior Year Roth IRA Contributions" screen.
If you withdrew earnings and qualify as first-time homebuyer then please follow these steps: