Theses and major research papers tend to follow a common formula in terms of the sequence of structure of the document.
This does not mean you need to slavishly follow such a structure but it may be a useful way to think about your work.
- An introduction to the problem, why it matters and how you plan to tackle it (usually written 2nd last)
- A review of the literature. How have other people thought about the problem? What have they done? What did they find? How does this relate to what you plan to do?