Max out 401k or save towards a house?

TL;DR do I prioritize buying a house or saving for retirement?

I'm almost 42 years old and am behind on retirement savings largely because my early jobs didn't have a 401k and I didn't make much money until my late 30s (didn't hit 100k until I was 35) and was also supporting my father financially. My father passed away a few years ago, but I now have the added expense of a toddler (single mom, no child support).

After raises go into effect I'll be making $240k in total cash (base +bonus) plus another $54k annually in stock (which vests over 1-3 years). I have zero debt besides my car and have $56k in high yield savings. My bonus and equity are tied to my salary so they will continue to go up. This past year we received 200% bonus so I'm due a 105k in March -- but this is very unlikely to happen again next year (so my 2024 total comp is $280k instead of 230k)

I desperately want to stop renting($3k/month), but I live in a high cost of living area (NYC suburbs). As everyone knows housing prices are insane, esp in this area. Even with a $150k down payment I'd be buying a $600k "fixer upper" and still have a mortgage payment of $4k.

Most people in my company (I started this past year so this is my first bonus) max out their 401k during the bonus payout. Last year, mainly because I'm paranoid about money, I was putting $1,000 month (and received the 4% match)

Is it better for me to put that 401k money towards saving for a down payment or should I max it out?