You can get an FHA (government-backed) mortgage with only a 500 credit score. However, conventional mortgages usually require a FICO score of at least 620—a cutoff imposed by Fannie Mae and Freddie Mac, two leading mortgage buyers in the US.
With that said, there’s no universal minimum credit score needed to buy a house. This is because credit score requirements vary depending on the mortgage company and the type of home loan you’re applying for.
To get the best chance of approval and the best loan terms, optimize your credit health as much as possible before applying for a mortgage.