The quotation here is from the history of Samuel and from a Psalm of Ethan in the Old Testament.
“to be their king for forty years”
This expression means God caused Saul to stop being king. AT: “rejected Saul from being king”
“Raised up” here is an idiom for “established.” AT: “he established David to be their king” (See: rc://en/ta/man/translate/figs-idiom)
“the king of Israel” or “the king over the Israelites”
“God said this about David”
“I have observed that”
This expression means he “is a man who wants what I want.” (See: rc://en/ta/man/translate/figs-idiom)