"Inspector" vs. "investigator": two sides of detective language

What is similar?
Both "inspector" and "investigator" refer to roles involved in examining or scrutinizing situations, objects, or people to gather information or ensure compliance with rules or laws.
What is different?
An "inspector" often checks for compliance with standards and regulations, usually in a formal or official capacity, such as a building inspector. An "investigator" is typically engaged in detailed inquiry or research to uncover facts or gather evidence, such as a private investigator in a criminal case.
Which one is more common?

Examples of usage
Inspector- The health inspector visited the restaurant to ensure it met all sanitary regulations.
- Inspector Johnson carefully examined the new building for structural compliance.
- The private investigator solved the mystery of the missing jewelry.
- The police called in a forensic investigator to analyze the crime scene.