It really is a shame that lots of people look at Ecclesiastes and see pessimism and a downer. As he’s drawing things to a close, Solomon informs us that it was actually written for our PLEASURE. God’s words and commands are intended to DELIGHT us!
His words are also intended to “prod” us into action - that's what goads do. Shepherds use them to direct their herd down the proper path, away from those that lead to destruction.
Fear God and keep His commands [v.13] – trust Him and obey Him. There’s importance in the order here. The evidence of trusting/fearing God is obedience, but you will never obey God if you don’t trust/fear Him.
Why do we obey and why are we gladly wounded by the one Shepherd? Because the day of reckoning is coming. One day every action (deed) and every thought (secret thing) will be brought into judgment by God.
The Good Shepherd uses the reality of our sin as a goad to drive us to the cross. Jesus lived the life we couldn’t and died the death we deserved in order to redeem everyone who believes from the curse and penalty of sin. We will all face a day of judgment, and we will either face it with Christ as our substitute or we’ll face it alone. You don’t have to face it alone. Believe in the Son. Fear God, obey His commands. Be reconciled to Jesus today, because today can be the day of your salvation.