There's research, but there's a lot of controversy on when/how patriarchy developed. The most important thing to note is that Greek/Roman/Chinese/Japanese style misogyny is not universal and has not always been the norm. Societies differed a lot in how much power and autonomy women had. At the same time, we must be conscious even the 'best' societies of the past still had faults surrounding women.
Some places to start are:
Alice Evans: Ten Thousand Years of Patriarchy: This article looks at it from an economic and cultural perspective. I strongly recommend reading her Substack, where she travels around the world interviewing Third World Women and Feminists to see why their women's liberation movements have succeeded or failed! From the linked article:
Our world is marked by the Great Gender Divergence. Objective data on employment, governance, laws, and violence shows that all societies are gender unequal, some more than others. In South Asia, North Africa and the Middle East, it is men who provide for their families and organise politically. Chinese women work but are still locked out of politics. Latin America has undergone radical transformation, staging massive rallies against male violence and nearly achieving gender parity in political representation. Scandinavia still comes closest to a feminist utopia, but for most of history Europe was far more patriarchal than matrilineal South East Asia and Southern Africa. [...]
Why do some societies have a stronger preference for female cloistering? To answer that question, we must go back ten thousand years. Over the longue durée, there have been three major waves of patriarchy: the Neolithic Revolution, conquests, and Islam. These ancient ‘waves’ helped determine how gender relations in each region of the world would be transformed by the onset of modern economic growth.
Another thing to remember/consider when it comes to studying the past is how few resources we have. We only know so much about how pre-historical humans organized their societies. Colonialism destroyed evidence of other societies with different ways of approaching gender. Many of the great apes we study are endangered. And literate societies happened to be patriarchal societies (likely related to literacy going hand in hand with bureaucracy and agriculture and the development of a state?) so we don't know as much as we could about women in literate regions.
Organized religion definitely codified a lot about patriarchy, but the major religions (Christianity, Islam, Buddhism) arose in regions of the world that were already patriarchal. So it's kind of a chicken and the egg problem when it comes to patriarchy and religion. We know that religions that worshipped goddesses, like Greek and Roman paganism and Hinduism, can still coexist with sexist societies.
These aren't great answers, but it's a big question and there are a lot of people working on answering it! It ties back into the bigger question of what our human ancestors were like, and whether we're kind of doomed to violence and xenophobia or whether there are alternatives. Some other books I've read that may be useful reading on this front are:
The Dawn of Everything. A long book, but it's a tour of human history and different societies and ways of organizing society. One of the chapters is on women, if I recall correctly.
Women's Work: The First 20,000 Years: Women, Cloth, and Society in Early Times. Women have been working with cloth for a very long time. In some societies, this allowed women a high degree of status (see the Minoans!) and in others, women were worked to the bone producing textiles (Ancient Egypt).
The book "Demonic Males" looks at the birth of patriarchy from a primatology perspective. Our ape ancestors show male-dominant behaviors and societies. It's controversial the extent this is directly responsible for misogyny and male violence, but I think it's likely that our ape inheritance influenced the structure of early humans - so we basically have a lot of baggage.
Broadly speaking, reading books on feminist anthropology will help you, because a lot of what we know about patriarchy is based on highly literate societies, which as we established, are also agricultural societies with bureaucracies and a hierarchical culture. That's hardly representative of the human condition. As an example, look at Inuit society - on the one hand, there is arranged marriage and all that it implies; on the other, we do not have the same ideals of silent women who stay at home - women are valued members of the society and their skills are explicitly recognized as necessary for survival. Compare Western cultures that view domestic tasks as "support" tasks while the "real" work is done by men.
Finally, this one is a bit old (1974), but it may give you a starting point for understanding feminist anthropology and the search for the origins of patriarchy: "Is Female to Nature as Male is to Culture". It can help us understand how female subordination manifests itself in different cultures, and to know what to look for.
I hope this has been helpful. If anyone can recommend good books on the origin of patriarchy/female subordination (especially for non-Western cultures), please feel free to add in the replies or reblogs!