Rom 8:1 There is therefore now no condemnation to those who are in Christ Jesus, who do not walk according to the flesh, but according to the Spirit
The “Therefore” points to the argument of ch 7 that in Christ we are delivered from sin and the curse of the lawand are not condemned anymore because they are in Christ Jesus. This assurance is for the people who have died with Christ and raised in Him. In Him they satisfied the demands of the law hence they are no longer under its control.
Before salvation, we were married to the law (Rom 7:1-6) and bound to it as long as we lived (how a marriage works). When we died in Christ, the law as the ex living husband had no grip or dominion over us anymore and therefore we could be married to another, that is Christ. In this, there is no condemnation or guilt. In this, we no “do not walk according to the flesh, but according to the Spirit”. We have a new master, with new desires and we therefore yield in obedience to His leading and guidance. Col 3:1-3 “1 If then you were raised with Christ, seek those things which are above, where Christ is, sitting at the right hand of God. 2 Set your mind on things above, not on things on the earth. 3 For you died, and your life is hidden with Christ in God.”