“Quality” is an extremely ambiguous term if you want to make sure that the building is sound and without major defects start with your real estate agent.
Your agent can be very helpful is providing you with references to appropriate inspectors. I would definitely start with a contractor’s home inspection who can tell you the condition of the major components of the home (electrical, plumbing, foundation, etc.). If this report reveals substantial cracks in the foundation, water under the home or other concerns then additional inspections may be warranted. Evidence of rodent activity usually requires a specialist to tell you how to deal with this issue.
You will also probably want a pest control (aka “termite”) inspection and a roof report, at a minimum. Dealing with any issues they bring up could be quite costly.
If the property has a well, septic system or pool those should also be inspected along with retaining walls, if any.
You can see that buying a home is a very complex transaction where the price of the property is only one aspect. Make sure you are represented by an experienced and knowledgeable agent who can protect your interests.