Rest from enemies and rest for the people of Israel are connected. There will be rest for the people of Israel when David has rest from his enemies. In this case, the enemies were the nations around Israel who sought to stop or prevent David’s rise to power.
11 from the time that I appointed judges over my people Israel. And I will give you rest from all your enemies. Moreover, the LORD declares to you that the LORD will make you a house.