The way this works is when you walk according to the Spirit you do not violate the law of Moses. So you can use the law to learn what walking according to the Spirit looks like. Here's an example.....
Leviticus 19:11-18
11“ ‘Do not steal.
“ ‘Do not lie.
“ ‘Do not deceive one another.
12“ ‘Do not swear falsely by my name and so profane the name of your God. I am the Lord.
13“ ‘Do not defraud or rob your neighbor.
“ ‘Do not hold back the wages of a hired worker overnight.
14“ ‘Do not curse the deaf or put a stumbling block in front of the blind, but fear your God. I am the Lord.
15“ ‘Do not pervert justice; do not show partiality to the poor or favoritism to the great, but judge your neighbor fairly.
16“ ‘Do not go about spreading slander among your people.
“ ‘Do not do anything that endangers your neighbor’s life. I am the Lord.
17“ ‘Do not hate a fellow Israelite in your heart. Rebuke your neighbor frankly so you will not share in their guilt.
18“ ‘Do not seek revenge or bear a grudge against anyone among your people, but love your neighbor as yourself. I am the Lord.
This helps you discern what kinds of things the Spirit of God is going to be leading you into.