In vain appears 48 times in the King James Bible
Perhaps most resonantly in Psalm 127:
Except the Lord build the house, they labour in vain that build it: except The Lord keep the city, the watchman waketh but in vain.
Nobody with any feeling for the English language at all could hear that in church, chapel or Sunday School, as centuries of English- speakers did, and not remember it.
I can’t answer for the Hebrew, but the KJV is a straight translation of the Vulgate Latin: ”in vanum laboraverunt”.