Ezra
1 Chronicles 18:2ESV·traditional attribution

And he defeated Moab, and the Moabites became servants to David and brought tribute.

Matthew Henry Presbyterian @wholebiblehenry

After this, it is said (Ch1 18:1), David did those great exploits. After the sweet communion he had had with God by the word and prayer, as mentioned in the foregoing chapter, he went on his work with extraordinary vigour and courage, conquering and to conquer. Thus Jacob, after his vision, lifted up his feet, Gen 29:1.

Commenting on 1 Chronicles 18:1-8

Jamieson-Fausset-Brown Reformed @jfbcommentary

he smote Moab--The terrible severities by which David's conquest of that people was marked, and the probable reason of their being subjected to such a dreadful retribution, are narrated (Sa2 8:2). the Moabites . . . brought gifts--that is, became tributary to Israel.

Adam Clarke Methodist @methodicalclarke

Brought gifts - Were laid under tribute.