The story of Saul comes to mind when talking about the primacy of righteousness over offering sacrifices. He was instructed by the Lord to kill everything including animals. Saul spared the best of animals and Agag, the king (1 Sam 15).
When Samuel asked why he spared the best of animals, he said he kept them so they could be used for sacrificing unto the Lord. Probably, he thought that would impress God but he got it wrong there. What impresses or pleases God is obedience not sacrifice. Though sacrifice is good but obedience is better.
Today, sacrifices can be church attendance, engagement in church activities, giving huge sums of money to the Lord, helping the poor, widows&orphans, building a church, prayer&fasting and so on. As good as these things are, they are not a substitute for obedience.
Where God requires obedience, nothing else can substitute for it not even prayer&fasting.
I once listened to a lecturer who told some of us in his classroom that we should ensure to steal big money because If we steal big money, all we need do is to ensure we build a big worship centre for God from its proceeds. Then, we should resume there every morning praying. He said that one day when God is tired, he will forgive.
You cannot live in sin thinking your activities is a substitute for genuine repentance. It doesn't work that way. God won't lookaway from your sins because of your devotion or commitment to church activities except you repent.
Our generation places much emphasis on sacrifice. We call it "kingdom sacrifice" but we downplay pleasing God. While sacrifice is good, always know that righteousness and obedience is by far better. It is only the sacrifice of a righteous man that will always be pleasing unto God.
Find out what God wants you to do. Do it and you'll be pleasing to him.