These are things that David says he will do, along with "seeing the prosperity of your chosen." The missing words may be added. AT: "I will rejoice in the gladness ... and I will glory" (See: [[rc://en/ta/man/translate/figs-ellipsis]])
Here the phrase "your inheritance" refers to the Isrealites, who are Yahweh's chosen people. Here "glory" means "to boast about" something; in this case they are boasting about Yahweh. AT: "boast of your greatness with your people" (See: [[rc://en/ta/man/translate/figs-metonymy]])