When you buy a home, the amount you can spend depends on how much you have in cash to use for a down payment and how much you can borrow. A mortgage lender can prequalify you for a loan, which essentially means the lender will ask you a few questions about your income, credit profile and debt, and give you an estimate of what you can borrow based on those facts.
However, before you begin looking for a home, you should get a full preapproval from a lender based on verification of your credit and income, because that will give you a more accurate idea of how much you can borrow.