The remnants of Israel who returned from exile have let their priorities become self-centered when they should have been focused on God, so Haggai encourages the people to continue rebuilding the temple.
Joy is found in God Alone. God causes the Israelites to have joy and commit themselves to joyous praise. He teaches them where to locate their joy and how to have joy that isn’t based on feelings or circumstances but based on an everlasting relationship with Him.