Romans 2:13, NIV
It is not just about hearing and knowing what is written in the law of God. Those who choose to obey will be declared righteous. You need to put everything that you learned into action. God sees you as righteous if you will obey Him even in seasons when you are in pain or having a hard time. Do it not to honor others or even yourself but do what’s right to glorify God in your life. Remember that you are loved. You are accepted by your Heavenly Father. So let His great mercy and love compel you to do His will. Let His grace motivates you to love Him and others.
I pray that you will learn to obey the laws of God.