Why exactly towards the end of the 19th century, Great Britain began to lose its economic primacy?

For a long time, Britain held first place in the world in terms of the total volume of exports (i.e., exports) of goods, but at the beginning of the 20th century. it was overtaken by the United States, and the technical superiority of England, which even in the middle of the 19th century. was overwhelming. So, at the turn of the nineteenth and twentieth centuries, when electric energy was already widely used in the industry of the USA and Germany, steam power was still mainly used in British industry.
In the 1880s, it became apparent that German goods were crowding out English goods everywhere. This happened in South America and Russia, in Italy and the Balkans, in China and Japan, even in Great Britain and its colonies. The point is that German merchants are better than the British at studying market needs in different countries and taking into account the interests of consumers. Wholesale buyers, for example, they provided soft and long-term loans, Britain managed to maintain its place among the leading industrial powers in the world, but it has forever lost its former dominant position.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.