No one can "obey" until they become saved/born-again
No one can be born again, saved unless they obey. This where grace comes in; the God given ability granted to us unmerited by God to do what we can not do without it.
In short, grace is the Holy Spirit; the Spirit of grace.
We must obey the Gospel in order to be saved.
But
they have not all obeyed the gospel. For Isaiah says, “LORD, who has believed our report?” So then faith comes by hearing, and hearing by the word of God.
Romans 10:16-17
For the time has come for judgment to begin at the house of God; and if it begins with us first, what will be the end of
those who do not obey the gospel of God?
1 Peter 4:17
As we see here, the scripture makes a distinction between, the ”house of God” and those who do not obey the Gospel, (the unsaved).
Again, we are born again by obeying the Gospel truth, through the power of the Spirit.
Since you have purified your souls in obeying the truth through the Spirit in sincere love of the brethren, love one another fervently with a pure heart,
having been born again, not of corruptible seed but incorruptible, through the word of God which lives and abides forever, 1 Peter 1:22-23
- you have purified your souls in obeying the truth through the Spirit
That’s why Paul says the Gospel, is the power of God unto salvation.
Only those who obey receive the Holy Spirt.
And we are His witnesses to these things, and so also is the Holy Spirit whom God has given to those who obey Him.” Acts 5:32
- so also is the Holy Spirit whom God has given to those who obey Him.”
JPT