The word "name" here is a metonym for David's reputation. His name is spoken of as if it were a person who could move. The word "lands" is a metonym for the people living in those lands. Alternate translation: "People in all the lands nearby knew who David was" or "People in all the lands nearby knew that David was a mighty warrior" (See: [[rc://en/ta/man/jit/figs-metonymy]] and [[rc://en/ta/man/jit/figs-personification]])