The premise of this book is pretty simple: We all have regrets in life. If you could make different choices, which version of your life would you choose?
The protagonist, Nora, has plenty of regrets. When she decides to end her life, she winds up in the Midnight Library, a place between life and death where she is free to explore any of the infinite alternate lives she could have lived had she made different choices.
Through the course of the book, Nora samples many lives. One of the principle lessons seems to be that the perfect life is a myth. We imagine that doing a few things differently could fix everything, but of course life is not so simple. Our imagined futures might be different, but they would still be messy.
Another lesson is that our darkest days are only temporary. Pain and trauma subside. Regrets can be nullified, or even transmuted into something beautiful, if you put in the effort.