What does Deuteronomy 17:20 mean?
This way, he won't start thinking he's better than everyone else or turn away from God's commands. If he does this, he and his descendants will rule for a long time in Israel. Deuteronomy 17:20 - Modern Text Bible
(The point is to keep the king grounded and faithful, so his leadership lasts and benefits everyone.)