History is a discipline in the academy that is some times a social science and sometimes a humanity. However, there are many other social sciences (economics, political science) and many other humanities (anthropology, theology). What differentiates history from its close relatives in the social science and humanities. How can we tell that something is history and not archaeology? How can we tell that something is economics and not history? Do other disciplines use historical methodology? Does this alone make them historians?
This is a really tough question to answer. History is not just the study of what happened in the past and when it happened. Sometime around sophomore or junior year of high school, more perceptive students pick up on the fact that history is about the interpretation of various events and the sheer breadth and variety of interpretations is what makes the study of history interesting.
In terms of how we can differentiate history from other areas of study. The short answer is that we really can't. History itself is a blanket term that covers a lot of different areas of study. For example, the study of the mathematical concept of volume and the study of, let's say, World War II can both focus on the certain moments that "motivated" these events. But one may require quite a substantial understanding of mathematics; both however are unarguably the study of history.
As you mentioned history can be considered a social science. With other social sciences like sociology, economics, psychology, history uses elements of the scientific method. In fact in terms of research methodologies I would strongly recommend The Craft of Research by Booth et. al. that really lays out indiscriminately of field of study, the various elements that constitute good argumentation which is what historical research is based upon.
I always consider history to be a social science. Science is always changing. New frontiers are always being discovered and old theorems disproved. History is the same. For example, in grade school, many kids are taught that the ancient Pyramid of Giza was built by enslaved Jews. But in fact, pyramids were largely built by skilled laborers and farmers who were drafted to perform the duties of pyramid construction. This huge change in the way we think about who built the pyramids didn't just happen overnight. Extensive research was conducted and different areas of study (including archaeology) were incorporated to provide the evidence to convince people that this in fact was the truth. History is not set in stone. In fact, history constantly evolves, just like the sciences, to reflect our interpretation of the world. After all, if we didn't support historical discoveries with evidence who would believe them?
In short, there is no easy way to differentiate what is "history" and what is everything else. The fact is that because history is the study of the journey of humanity through time in all its various angles, it invariably must cover everything that is of interest to humanity. So there is the history of science, history of computing, history of ancient China, history of archaeology, even history of the various fields that were studied in relation to archaeology before archaeology became recognized as its own field of study.
I know this was long, but I hope it helps you understand that history is not an isolated field. It shares its research methodology with the sciences and draws on every conceivable area of study to formulate interpretations that can be supported with hard evidence.
P.S. this may also help you understand what historians do: https://medium.com/editors-picks/f69e08b57b74
A good definition of history that historians use is 'History is the study of change over time.' Historical studies, to a large extent, rely on theory and methodology. A series of facts is a narrative, it is not a historical study. Analyzing those facts, placing them into context, understanding the underlying factors that contributed to those facts occurring, all of that and then some is encompassed by the study of 'history.' Furthermore, history is very much interdisciplinary. Various graduate programs in history will encourage students to take classes in other disciplines (anthropology is a perfect example) and incorporate what they learn outside the field into their dissertation, articles, reviews, books, etc. Historians usually have to become immersed in the subjects they study. Thus economic historians have to have a general and at times detailed understanding of economics that's relative to the time period and location they specialize in. The same applies to politics, labor, medicine, technology, philosophy, warfare, etc. I can't comment on what those outside the discipline of history do, but I can say that 'outsiders' who try to write about history usually fail in that they do not understand how to incorporate either theory or methodology. What readers are left with are either popular histories that add nothing new to the canon or failed attempts to discuss historical subjects/ideas.