Data for market research is gathered through both primary and secondary research.
Primary data: is based on research that you conduct yourself using tools such as surveys, polls, focus groups, and interviews. Primary research is used to address a specific problem.
Secondary data: is based on research done by others, such as government agencies, market research firms, and trade associations. Examples of secondary sources include statistics and market research reports.
Source: https://www.mymarketresearchmethods.com/primary-secondary-market-research-difference/