Lenders depend on credit scores to determine the overall risk of the person receiving the loan.
First, your credit history is reviewed to see if you have been making good on payments owed to perhaps an auto loan or a student loan. The history of repaying your loans without lateness or defaults, the higher your credit scores.
If one person is taking out the loan, then that person’s credit score is used. If two people are taking out the loan together, then both credit scores are used to determine the risk of issuing the loan. Best to get both scores to a high credit score level if necessary. Your credit scores are free and should be available from your online banking, or get a free full credit report from the FTC approved website. https://www.ftc.gov/faq/consumer-protection/get-my-free-credit-report
Review the credit report carefully for any errors. Correct the errors quickly 6 months before applying for a mortgage loan because the lenders will be using the same credit report information to determine whether your loan application is approved or denied. Once you put a bid on a home, you do not want a mortgage application to be denied because you overlooked an error on your credit report. Simply not worth it on such a big purchase if you can correct these errors.
Simple rule to follow to boost your credit scores: Pay on time, pay it off, and keep zero balances on credit cards. Every payment is a record. The card you have from college may have 10+ years of payment history that weighs on your credit score.