Karl Popper was a 20th century philosopher of science, best known for his work on falsifiability. He was critical of the ideas put forth by previous philosophers such as Carnap, that science works by verifying your theories through examination of the world. He said that many theories that were not scientific could be successfully verified by either making vague predictions, or through ad hoc adjustments to the theory. For example a horoscope can predict something vague like “you will have a pleasant surprise later this week”. Then you find some forgotten money in your pocket, and the horoscope was seemingly verified to be true! However since nearly anything could have verified it, since it was so vague, this does not count as science.
He was particularly critical of Freud’s theory of psychoanalysis and Marx’s theory of historical materialism, both of which were considered scientific by many at the time, but seemed to explain almost all sets of observable data. Instead he suggested that scientific theories must put forwards highly specific predictions, and the scientists must then work to falsify, rather than verify, the theory.
Albeit an important one, the scientific method is only one of the building blocks of science. If using it was the singular measure of whether you are engaging in a scientific activity, then all mathematicians, theoretical physicists, statisticians, computer and data scientists, zoologists and botanists, geographers, and medical doctors would be practicing hocus-pocus, despite still somehow always publishing worthwhile results. Collecting specimens, sorting and organising data, computing simulations, coming up with suitable definitions, solving problems, and proving theorems are exactly as important parts of science as prediction and empirical inquiry. One of these parts is also to establish the most reliable and parsimonious frameworks in which the social sciences such as economics, sociology, or psychology can operate, a function that is precisely fulfilled by Marxism. These disciplines don’t employ Marxist theory because their pursuers are sympathetic to socialism (Spoiler: They mostly aren’t), but because the reality of doing economics, sociology, and psychology forces it on them to the point they cannot escape it.