Ezekiel 36:24-26 “For I will take you [now he is talking to the people, not the mountains, not the rivers, not the hills or valleys, or the plains. He is talking to the people now, the ones who are going to come back and inhabit the land and grow the crops on it. This time they are going to do it he right way.] from among the nations, gather you out of all countries, and bring you into your own land. Then will I sprinkle clean water upon you [Now we understand he is talking about His Spirit.], and you shall be clean; I will cleanse you from all your filthiness [He is talking about spiritual things and of course all of the wrong physical, material practices. All the excesses that mankind has used to rape the land.] and from all your idols. I will give you a new heart and put a new spirit within you; I will take the heart of stone out of your flesh and give you a heart of flesh.
I want you to connect the last part of this chapter with the first part. He begins by describing a desolate land, then he prophesies that the desolate land is going to be beautiful and produce more than it ever produced before, then he tells why He is going to do it. That is, because His name has been profaned and now He is talking to the people and He is telling them that the only thing that will make this possible is because their heart is changed.
But, they did not have that missing ingredient that would have helped them perceive, and hear, and heed the true way of God. Of course, that element is God's Holy Spirit. But, they are going to have it someday. When they rise in the second resurrection, they will have a chance to redo what they did. They get to try again.
They are going to have the same law, but now, they will also have the Holy Spirit of God to guide them. Look at what it says,
This is where the context begins - with the children of Israel coming out of their captivity.