If you have declared bankruptcy recently and are now trying to buy a house, it will be very difficult. I had to declare bankruptcy long ago. My credit score was shot. I ended up getting a used car loan at an outrageous interest rate just as an effort to restore the credit. I paid it off on schedule and didn’t make any late payments. I didn’t pay it off early even though I could have. It took 4 years (if I remember right) and the bankruptcy stays on your credit for 7 years. But at the end of the time it had been 6 years since the bankruptcy and my credit score was back to a place where I could get loans and not pay loan shark interest rates.
I’d suggest you are in the same situation, though trying to buy a house will likely be impossible. If you recently declared bankruptcy you will be viewed as a poor risk for a loan. You’ll have to restore your credit first and that could take some time.