Many had direct access to a relationship with YHWH before that. What separated those who didn't?
Faith.
It was their sin. Yahshua takes away sin. He doesn't sweep it under the carpet. He takes it out of the house.
David was a sinner.
David had access by way of the Anointing.
We have access by the same Spirit, by Faith.
Romans 9:
30 What shall we say then? That Gentiles, who did not pursue righteousness, have attained to righteousness, even the righteousness of faith;
31 but Israel, pursuing the law of righteousness, has not attained to the law of righteousness.
32 Why? Because
they did not
seek it by faith, but as it were, by the works of the law. For they stumbled at that stumbling stone.
33 As it is written:
“Behold, I lay in Zion a stumbling stone and rock of offense,
And whoever believes on Him will not be put to shame.”
David, like Abraham, believed in the promises given.
He believed in the One who can take away sin.
Psalm 51:
1 Have mercy upon me, O God,
According to Your lovingkindness;
According to the multitude of Your tender mercies,
Blot out my transgressions.
2 Wash me thoroughly from my iniquity,
And cleanse me from my sin.
3 For I acknowledge my transgressions,
And my sin
is always before me.
4 Against You, You only, have I sinned,
And done
this evil in Your sight—
That You may be found just when You speak,
And blameless when You judge.
5 Behold, I was brought forth in iniquity,
And in sin my mother conceived me.
6 Behold, You desire truth in the inward parts,
And in the hidden
part You will make me to know wisdom.
7 Purge me with hyssop, and I shall be clean;
Wash me, and I shall be whiter than snow.
8 Make me hear joy and gladness,
That the bones You have broken may rejoice.
9 Hide Your face from my sins,
And blot out all my iniquities.
10 Create in me a clean heart, O God,
And renew a steadfast spirit within me.
11 Do not cast me away from Your presence,
And do not take Your Holy Spirit from me.
12 Restore to me the joy of Your salvation,
And uphold me
by Your generous Spirit.
13
Then I will teach transgressors Your ways,
And sinners shall be converted to You.
14 Deliver me from the guilt of bloodshed, O God,
The God of my salvation,
And my tongue shall sing aloud of Your righteousness.
15 O Lord, open my lips,
And my mouth shall show forth Your praise.
16 For You do not desire sacrifice, or else I would give. You do not delight in burnt offering.
17 The sacrifices of God
are a broken spirit,
A broken and a contrite heart—
These, O God, You will not despise.