You should do what will work best based on your writing style. For instance, if writing the introduction first helps settle you down and give you focus, write it first. If it is too constricting, write it later.
Keep in mind that everything you write will have to be revised again and again and again. I don't mean just proofing individual words. I mean the whole book. It is very common for authors (especially first time authors) to write paragraphs, pages, and even whole chapters and then have to completely cut them out later. That's part of the writing process, and it is not a sign that anything is going wrong. A real author lets the book flower on its own. Something that you find yourself writing in chapter 8 will affect what's in chapter 3 and chapter 7. It will also influence what you thought would go into chapter 11, 14-16, and the conclusion. Then the introduction has to be rewritten. Again and again. And again.
So, just do what works for your writing process now. In the beginning of a writing project, the most important thing is to get started.
Good luck to you!