The Midnight Library by Matt Haig

Somewhere out beyond the edge of the universe, there is a library that contains an infinite number of books, each one the story of another reality.