The Order Protects the Gospel
Not by works of righteousness which we have done, but according to his mercy he saved us, by the washing of regeneration, and renewing of the Holy Ghost; Which he shed on us abundantly through Jesus Christ our Saviour; That being justified by his grace, we should be made heirs according to the hope of eternal life.
Titus 3:5-7 KJV
Religious activity can become a substitute for faith if you begin trusting the activity to make you acceptable to God. Titus 3:5-7 rules out even works we would call righteous as the cause of salvation.
The passage speaks of mercy, regeneration by the Holy Ghost, and justification by grace through Jesus Christ. New birth is God's inward work, not a coat of religion placed over unchanged life. Salvation rests on the Saviour, not your achievements.
Paul still calls believers to good works in the surrounding chapter. Grace changes the motive and puts obedience in its proper place. Serve because you belong to Christ, not because you are trying to pay for belonging. Keeping that order clear protects both the gospel and the humility of the person who professes it.
Keep the passage in context
Paul grounds salvation in God's mercy, regeneration by the Holy Ghost, and justification by grace through Jesus Christ. Righteous works cannot cause salvation. The surrounding chapter then calls believers to useful good works.
Read further: Titus 3 in the King James Bible.