Such books are called "history of mathematics". Of course one book will not tell you the origin of every theorem, mathematics is too large, you have to search in many books.
On the subject of elementary geometry, one good book is Florian Cajori, History of elementaty mathematics.
Interestingly, most of the elementary geometry is not of ancient Greek origin. Euclid only laid the foundation of the subject, and his immediate successors were more interested in the more advanced subjects (like conic sections, integration etc.) Most of the existing body of "elementary geometry" was discovered in 19th century.