Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
LXX

Ecclesiastes 8:14

There is a vanity which is done upon the earth; that there are righteous persons to whom it happens according to the doing of the ungodly; and there are ungodly men, to whom it happens according to the doing of the just: I said, This is also vanity.

Read in other translations