The Tolkien book published posthumously in 1977 that contains Middle-earth’s creation mythology is The Silmarillion.
The Silmarillion was edited and published by Christopher Tolkien four years after J.R.R. Tolkien’s death. It is not a single conventional adventure novel. Instead, it gathers and organizes myths, legends, histories, and linguistic materials covering the creation of Eä, the divine Valar, the Elves, and the long wars against Morgoth.
Its principal sections include the Ainulindalë, which describes creation through music; the Valaquenta, about the Valar and Maiar; the Quenta Silmarillion, centered on the Silmarils; and later material about Númenor and the Rings of Power.
Readers sometimes mistake it for an unfinished draft with one continuous narrative. It is better understood as a foundational mythology assembled from Tolkien’s extensive, changing body of manuscripts.