What are good books about financial markets? I found answers on this question online but people always recommend books for beginner investors who want to become rich. I just want book that is about history and role of financial markets and book that explains how financial markets work.I don't want to read how to become a millionaire by investing.
The classic undergraduate textbook is Financial Markets and Institutions from Mishkin and Eakins. I can wholeheartedly recommend this textbook check some local secondhand textbook stores where you can get it cheap (new book is unnecessarily pricey).

If you are not looking for a textbook I would recommend Ascent of Money by Ferguson- that’s mostly about history and it’s written in extremely simple language targeted at general audiences