Different style guides have different recommendations. APA style, for example, suggests using numerals for most numbers above ten. If you’re writing a non-fiction book in the field of social or behavioral sciences, you’ll want to follow that style guide.
In literature, you’re bound to see numbers as words more often than numerals. Many publications in this field use the MLA style guide, which suggests spelling out any number that can be written in one or two words: thirty-five, seventeen, eight. Don’t start a sentence with a numeral. Either rephrase the sentence or spell out the number.
Always check the style manual in your discipline when making these decisions. You may even find a particular publication has its own style quirks when it comes to numbers. Make an informed choice, but be open to possibilities when it comes time to publish.