This is The Green Book, a 1986 novel by Jill Paton Walsh.
Pattie and her family are among the last refuees to flee a dying Earth in an old spaceship. And when the group finally lands on the distant planet which is to be their new home, it seems that the four-year journey has been success. But as they begin to settle this shining world, they discover that the colony is in serious jeopardy. With supplies dwindling, Pattie and her sister decide to take the one chance that might make life possible on Shine.
To quote from a time I answered this before:
Indeed, the wheat comes out crystalline and is poisonous to the humans and livestock. The settlers survive on rations, but are close to running out. The moth people hatch from what was originally thought to be a hill of boulders and they eventually return to those round objects.
The children realize that the wheat can be eaten if it's ground up first if I recall correctly. I don't remember how they figured that out.
And yes, the girl has been writing up the history of the story. Due to storage limits, everyone was allowed one book (later in the book, it's established that there are a lot of duplicates, and those who brought a unique book charge high in barter for the privilege of borrowing it). Her siblings teased her unmercifully when they first set off because she brought a blank book, but of course, it turns out she's been writing the first new book of the planet.