Lord, who may dwell in your sacred tent?
    Who may live on your holy mountain?

The one whose way of life is blameless,
    who does what is righteous,
    who speaks the truth from their heart;
whose tongue utters no slander,
    who does no wrong to a neighbour,
    and casts no slur on others;
who despises a vile person
    but honours those who fear the Lord;
who keeps an oath even when it hurts,
    and does not change their mind;
who lends money to the poor without interest;
    who does not accept a bribe against the innocent.

Whoever does these things
    will never be shaken.
NIVUK

The ‘Westminster Shorter Catechism declares: ‘Man’s chief end is to glorify God and to enjoy Him forever.’

It is important to say that this psalm is not teaching salvation by good works. Nevertheless, it does underline the point that we are saved by a faith that works. Righteous living is expected of those who claim to know God through Jesus. Furthermore, our enjoyment of fellowship with God will be adversely affected by careless living. (The idea behind ”dwell’ in v.1 is ‘stay as a guest’). If we want to ‘enjoy’ God, we must carefully order our steps. (We know from the New Testament especially, that the Holy Spirit will enable us).

Maybe ‘The Message’ carries a sense of this:

”God, who gets invited
    to dinner at your place?
How do we get on your guest list?

“Walk straight,
    act right,
        tell the truth.

3-4 “Don’t hurt your friend,
    don’t blame your neighbour;
        despise the despicable.

“Keep your word even when it costs you,
    make an honest living,
        never take a bribe.

“You’ll never get
blacklisted
if you live like this.”

‘Here is the holiness without which no one sees God (Heb.12:14), covering conduct, conversation and relationships (2-3), values, integrity and financial contentment (4-5).’ Alec Motyer

All of life matters to God, and is to be offered to Him as worship.

It should be said that, ultimately, this psalm is fulfilled only by Jesus; but to the extent that it is fulfilled in us, it is because of Him.