That’s a great question and a relative answer. It’s relative as to how you’re buying.
If you’re a cash buyer, with no need for financing it would only be 3-4 weeks max. If you’re using a conventional mortgage, then it’s a bit longer because you’ll need an appraisal. Going through the banks process, which can take 30-45 days.
A lot of buyers today use Low money down, you may have heard of them as RD loans (Rural Development) or VA loans (Veterans Administrations). These are state and federally backed and can be in the 45 day to about 6 week time frame.
In general, think you’ll take from 1-2 months, to purchase a house, based off how you’ll be financing.