Should I max out my Roth IRA?

27 (M) here.

Opened a Roth IRA a few months ago and debating maxing out my contributions for 2024. Right now there’s nothing contributed, but I have ~$10k saved up.

My goal is to get a house within the next couple years, preferably before I’d be able to withdraw from the IRA. It took me about a year to save the $10k.

Should I max it out or keep saving? And should the current state of the economy factor into my decision? I get IRAs are long-term and not really susceptible to volatile markets, but worried I’d prefer to have more cash on hand in the near-future

If anyone has any advice I’d appreciate it