How to properly invest in the stock market is a hot issue of social concern, and some studies have shown that the herding effect will have a certain impact on the market stability and market efficiency of the stock market, and the herding effect between countries with different levels of development can be studied in more depth. The research topic of this paper is the study of herding effects in countries with different levels of development. The research methodology of this paper is as follows: developed and developing countries are divided into two categories, and four countries, the United States, the United Kingdom, China, and Indonesia, are selected to explore the causes and effects of the herding effect in developed and developing countries, respectively. The study found that the herding effect was more pronounced in developing countries compared to developed countries. The herding effect is more pronounced in developing countries because of the relatively imperfect construction of financial markets, the lack of financial literacy of the people, and so on, so these internal factors lead to the herding effect. In contrast, developed countries need to pay more attention to the herding effect caused by external influences such as epidemics and financial crises.