The purpose of the scientific method, just as is the purpose of adversarial prosecution in court before the jury from which science evolved, is to continuously recursively use sensory, logical, and physical observables to eliminate ignorance, error, bias, wishful thinking, suggestion, obscurantism, fiction, the fictionalisms, deceit, fraud, free riding, rent-seeking, corruption, denial, undermining, reputation destruction, social construction from any and all claims, leaving only testimony which is consistent with: realism and naturalism (causality), unambiguity (identity), internal consistency (logic), operational possibility (operationalism), external correspondence (observability), rational choice (incentives, motives), reciprocal rational choice (morality, ethics), and within stated limits, of full accounting within those limits, having demonstrated due diligence in all of the above, and within the limits of restitutabiity and liability.
By this method, we discover the first principles of the four sets of laws of the universe: formal (logical), physical, behavioral, and evolutionary laws; and from this set of first principles, we can construct a formal logic of falsification, that universally tests all truth claims regardless of person or context. The end result of scientific investigation is a formal logic of falsification (error and lie detection).
This process of falsification, discovery of first principles (irreducible causality), incrementally producing a formal logic of testimony, constitutes the scientific method.