Because it employs the scientific method to research and learn about human behavior, psychology is a science. We create laws, ideas, and hypotheses using suitable experimental study methods, unbiased data interpretation, and data analysis.
Having stated all of the foregoing, I must point you that our field is rather new. Our official history begins in the late 1800s. Since history began to be written about (and perhaps even earlier), philosophers, theologians, biologists, and many others have discussed the origins of human behavior, but they did not employ the scientific method. They did not provide objective support for their hypotheses. Medicine, chemistry, and astronomy have all been around for thousands of years. Please keep in mind that at first, medicine consisted mostly of leaches, forced vomiting, and bowel motions. Astronomy and astrology were also linked, and chemistry and alchemy were one. The human mind, brain, and behavior are some of psychology's most complicated subjects.
The brain has around 100 billion neurons, each of which contacts tens of thousands to hundreds of thousands of other neurons. The outcome is a machine that connects more things than there are stars in the entire universe. We are intricate biological computers that are yet far above even the greatest machines. Our conduct is the consequence of countless tens of thousands of years of culture, genetics, and evolution.
Psychologists are still in their infancy. Also, keep in mind that until recently, we lacked the equipment necessary to examine a living brain's functioning. Since the 1950s, the majority of the medications we use today to treat mental illness have been produced. We are the newcomers to the neighborhood. One final observation: Our subject matter dislikes being researched. It just won't respond to inquiries and will lie and conceal. People dislike the idea that natural rules govern and define their actions. We want to think of ourselves as unique.
Thanks,
Eddie