Sometimes the Holy Spirit will stop you from going in the wrong direction, even when you think you're doing God's will, or have His blessing to continue.
There are times when God directs us by stopping some opportunities so that we will focus on the path He's prepared for us. If you're hard-headed & move forward, doing things your way instead of His way, you'll mess up every time.
Acts 16:6-10
6 Paul and his companions traveled throughout the region of Phrygia and Galatia, having been kept by the Holy Spirit from preaching the word in the province of Asia. 7 When they came to the border of Mysia, they tried to enter Bithynia, but the Spirit of Jesus would not allow them to. 8 So they passed by Mysia and went down to Troas. 9 During the night Paul had a vision of a man of Macedonia standing and begging him, “Come over to Macedonia and help us.” 10 After Paul had seen the vision, we got ready at once to leave for Macedonia, concluding that God had called us to preach the gospel to them.From BibleGateWay.com