The more-or-less ignored headings of the 22 sections of this Psalm really do count if you read the individual eight verses of each as if they are a key. Beth is the key God has given to a place of shelter for:
9 How can a young person stay on the path of purity? By living according to your word.
10 I seek you with all my heart; do not let me stray from your commands.
11 I have hidden your word in my heart that I might not sin against you.
12 Praise be to you, Lord; teach me your decrees.
13 With my lips I recount all the laws that come from your mouth.
14 I rejoice in following your statutes as one rejoices in great riches.
15 I meditate on your precepts and consider your ways.
16 I delight in your decrees; I will not neglect your word.