Please don't fall for the trap of thinking of a "THE" scientific method. There's more than one means to arrive at valid conclusions.
What gets pushed as "THE" method is usually some version of logical positivism, or Karl Popper's falsificationist take on logical positivism.
Both of those deny the possibility of any knowledge that is not (in Popper's case) forever contingent on empirical falsification.
Any other form of statement or knowledge is dismissed as being merely tautological, just a convention in the use of words.
What do the claims of the logical positivists and of Karl Popper, tell us about themselves?
Are their statements forever contingent on empirical falsification?
Or, are they merely tautological? Does the claim that "this is THE scientific method" hold any deeper truths about the real world than the statement that "a bachelor is an unmarried adult male" is it any more than a convention in the use of words?
Actually, when you look at the Schlick Circle in Vienna, which constituted the core of the logical positivists, apart from Schlick himself who was a liberal (in the original sense, not the current American sense of the word) there was a definite political agenda, They were Marxists, and were unable to refute the logical criticisms of Marx made by economists ( Most notably, Eugen Von Bohm Barwerk; Karl Marx and the close of his system). Vienna was a place with a lot of ideas pre world war 1. Bohm Barwerk's as big a threat to the Keynesian system, which is why you don't get to hear much about him.
Their project was to so constrain the meaning of the words scientific and truth, that they hoped to nullify the criticisms of the economists.
Their attack of course goes far wider than just economics. Deductive reasoning could not be attacked in economics alone and continued in other fields of thought, hence we see Ernst Mach, researcher in Aerodynamics, rejecting Newtonian mechanics, because Newton's three laws cannot be empirically falsified.
There's also the supposed"refutation" of one of the postulates of the entirely logical deductive field of Euclidean geometry, by Einstein. That in a universe containing matter, the shortest distance between two points cannot be a straight line.
Einstein may or may not be correct in the widest sense, he does appear to be correct when we're considering the path taken by photons.
But, did Einstein's route to that idea refute logic and apriori reasoning?
Einstein had no way to test the idea, either to confirm or to falsify it. So there was no way that he could get to it by empirical observation and testing. His only way there was by apriori reasoning.
Raymond Bergner has some good stuff about knowledge and reasoning which is not amenable to empirical testing, applied to psychology and psychotherapy, up on his page on academia.edu. he's lovely! IMO well worth checking out.