In the short book of Haggai, the central theme is that God’s house (the temple) needs to be rebuilt. The people have not done so because they are focused on their own houses and comfort. As far as God is concerned, their priorities are wrong.
Three times God points this out, asking them to consider the quality of their lives. Things are not going well for them. Their efforts fail to produce the results they want, things don’t work out the way they should, and they are lacking what they need.
After Haggai delivers God’s message to the leaders and the people, their response is to rebuild the temple. Then God promises to bless them.
When their priorities were wrong, things went wrong; when their priorities became right, God’s blessings resulted.
Although the conclusion isn’t absolute, it is worth considering that when things are going wrong, it might be because our priorities are wrong.