2 Samuel 24:4

4 The king’s word, however, overruled Joab and the army commanders; so they left the presence of the king to enroll the fighting men of Israel.

Read 2 Samuel 24:4 Using Other Translations

Notwithstanding the king's word prevailed against Joab, and against the captains of the host. And Joab and the captains of the host went out from the presence of the king, to number the people of Israel.
But the king's word prevailed against Joab and the commanders of the army. So Joab and the commanders of the army went out from the presence of the king to number the people of Israel.
But the king insisted that they take the census, so Joab and the commanders of the army went out to count the people of Israel.

What does 2 Samuel 24:4 mean?

John Gill's Exposition of the Bible
2 Samuel 24:4

Notwithstanding the king's word prevailed against Joab, and
against the captains of the host
Who it seems were of the same mind with Joab, and were against numbering the people, yet their arguments and remonstrances were of no avail with the king; he was determined it should be done, and laid his commands upon them to do it, which they were obliged to comply with:

and Joab and the captains of the host went out from the presence of the
king, to number the people of Israel;
seeing him resolute and determined, they submitted, took his orders, and set out to execute them.

California - Do Not Sell My Personal Information  California - CCPA Notice