Paul's second missionary journey came to an end when he returned to the church in Antioch. Luke mentions brief visits by Paul to Ephesus and Jerusalem on his way back to Antioch.
The reason for Paul's return is connected to a vow he had made in Corinth. The period connected to the vow came to an end when he cut off his hair in Cenchreae, which was the port in Corinth from which he left the city. Cutting off the hair was an expression of thanksgiving at the end of the period covered by a vow, so it looks as if Paul had made a kind of Nazarite vow to serve God in Corinth, perhaps in response to the vision the Lord had given to him to bless his time there. The hair that had been cut after a Nazarite vow would then be taken to Jerusalem by the vower in order to be presented in the temple there, which is what Paul intended to do.
It is evident that Paul regarded a vow as a suitable public expression of faith for a Christian to engage in. This could have been because he was a Christian Jew and found aspects of the Old Testament ritual helpful for himself even although he knew that such practices were not binding on Gentile believers. Or it could have been that he realised that a public vow helped him to keep a right focus of dedication to God and of expressing gratitude to God for his help. Maybe such a public act of growing his hair also made it easier for him to witness to some Jews about his faith in Jesus because they would respect someone using the Nazarite ritual.
Should we make vows to God in which we say we will do something if he does something for us? We should not make them if we imagine that by doing so we can make God change his mind - we cannot use a vow as manipulation. Yet if a Christian wants to express his gratitude to God by promising to do a particular action, I don't think such an expression is inappropriate. But we should not make one that we know is impossible for us to keep.
It looks as if Aquila and Priscilla wanted to move to Ephesus, perhaps in connection with their trade. Paul used his time in Ephesus to make contact with the synagogue there, and the response of the Jews there was favourable to him, maybe because he was on a journey to fulfil a vow. Paul evidently regarded the keeping of his vow as more important than staying on in Ephesus even for a short time. So his example tells us that even favourable opportunities for spreading the gospel are not a valid reason for breaking a personal vow to God.
Luke passes over what happened in Jerusalem and Antioch. The reference to Jerusalem is in the phrase 'went up and greeted the church' - it was common to describe a journey there as going up. Obviously the churches in Jerusalem and Antioch were important centres of the Christian faith. Luke is about to describe how Ephesus also became such a centre. For this to happen, Paul had to engage in his third missionary journey and Luke mentions its commencement in verse 23. In it all, we see Paul's pastoral concern for the churches.