You are righteous through faith in Christ (Romans 3:21-22). Believers are justified and accounted righteous before God. It is never self-righteousness, but the righteousness of God in Christ. Righteousness is God's gift to believers in Christ.
You are righteous in Christ alone. The apostle Paul speaks of the righteousness of Christ imputed to believers in 2 Corinthians 5:21. "For He made Him who knew no sin to be sin for us, that we might become the righteousness of God in Him." Martin Luther called it the great exchange. Christ takes away your sins and gives you His righteousness.
You are righteous by faith alone in Christ. The Christian life can never be based upon your self-righteousness, which is as filthy rags before God (Isaiah 64:6). You give up all hope in self-righteousness and become righteous before God in Christ alone. Only faith in our Lord Jesus Christ can impute perfect righteousness to you before God. Simply stated, you are accounted righteous by faith in Christ.
You are righteous by God's grace alone in Christ. Your sins were imputed or accounted to Christ at the cross. His righteousness is imputed or accounted to you by grace alone through faith alone. There is only one way you can receive the righteousness of God. That's by grace alone through faith in Christ.