The book ends with two movements held side by side: David is preserved from fighting against Israel and strengthened by God after disaster, while Saul falls in battle with his sons.
Read and follow along: https://orthodoxbiblestudy.com/bible-studies/old-testament/1-samuel/1-samuel-29-31-david-preserved-and-saul-falls