Let’s start with this: there is no single correct definition of economics. But in textbooks and other resources about economics you tend to see variations of two definitions.
1) Economics is the branch of social science that studies the production, distribution and consumption of goods and services.
2) Economics is the branch of social science that studies how individuals and groups make decisions to allocate scarce resources.
My personal definition is bit more comprehensive (and perhaps a bit cynical). Economics is the branch of social science that knows how to use (and misuse) basic math and statistics. To me, economics encompasses all of social science. There are really no boundaries between the questions economists ask and those asked by, for example, psychologists, sociologists or political scientists. What separates economists from those other social scientists (for better or for worse), is the former’s ability (and the latter’s lack of ability) to pose and answer their questions using math and statistics.
So rather than define what economists study, let’s define what social scientists study. Here, I think a variation of the second mainstream definition mentioned above, is a good starting point. Social science is the study of how individuals and groups make decisions, and how those decisions in turn affect the individual and the group. I personally think the words “allocating scarce resources” are unnecessary since absent perhaps only breathable air (at least on the surface of Earth), ALL resources are scarce.
As you probably know, economics is almost always divided into two categories: microeconomics and macroeconomics. Studying how individuals and groups make decisions is essentially the generally accepted definition of microeconomics. But I’d argue that macroeconomics is really a subset of microeconomics. Rather than study the decisions of individuals or such groups as a firm, macro-economists are studying the decisions of a specific type of group, called a government, and analyzing data of a specifically defined aggregate of individuals and groups, called an economy.