Thank you for the question, “What book concludes that mankind should “fear God and keep his commandments”?”
The writer of Ecclesiastes says this in the conclusion of his book in chapter 12, “ 11 The words of the wise are like goads, their collected sayings like firmly embedded nails—given by one shepherd.[b] 12 Be warned, my son, of anything in addition to them. Of making many books there is no end, and much study wearies the body.
13 Now all has been heard; here is the conclusion of the matter: Fear God and keep his commandments, for this is the duty of all mankind. 14 For God will bring every deed into judgment, including every hidden thing, whether it is good or evil”(NIV).
The key point by the writer is that God will reveal the hidden things, whether good or evil, in his presence and for others to see. The pronouncement by God is just and righteous for the motivation and the actions will be seen by that person and by others.
SUMMARY: The writer gives the reason why mankind is to fear God and to keep his commandments. God is the Judge of mankind.
For further discussion:
https://www.quora.com/What-book-concludes-that-mankind-should-fear-God-and-keep-his-commandments