Checking rates online or asking a loan officer for a ballpark quote usually does not involve a credit pull at all. Many lenders can give a rough estimate based on the details you tell them, such as your price range, down payment, and general credit profile. Even when a lender does pull your credit, that is a hard inquiry, and a single one typically causes a small, temporary dip. Your own check of your credit report or score is a soft inquiry and has no effect on your score. The real credit event happens when you move forward with a formal application and authorize a full review.
Scoring models know that people compare lenders before choosing a mortgage. Multiple mortgage inquiries made within a short shopping window are generally treated as a single inquiry for scoring purposes. The length of that window varies by scoring model, so it is smart to do your comparisons close together rather than spread across several months. Auto loan and student loan inquiries are often grouped the same way. Credit card applications are different, and opening new accounts while house hunting can do more harm than rate shopping ever will.
For buyers, the practical takeaway is to shop rates, but to do it in a focused stretch of time. Get quotes from a few lenders within days of each other, and compare the loan estimates side by side, including fees and not just the rate. I would also avoid opening new credit lines, financing furniture, or making large purchases before closing, since those moves can change your approval far more than a few mortgage inquiries. Sellers benefit too, because a buyer who has been pre-approved with a clean credit file is a stronger, more reliable offer. In a market where rates have stayed elevated and move around from day to day, comparing carefully matters more, not less.
Checking rates is not the credit risk many people assume it is. Keep your comparisons within a short window, avoid new credit accounts, and focus on the full cost of each loan offer.