2 I went in response to a revelation and set before them the gospel that I preach among the Gentiles. But I spoke privately to those recognized as leaders, for fear that I was running or had already run in vain. -Galatians 2:2 BSB
Paul received a revelation from the Holy Spirit, but he went to seek confirmation to make sure it was from the Holy Spirit (“…for fear that I was running or had already run in vain“), from those who walked with Jesus Christ while He was on earth, see verse 9.
Paul shared with the spiritual leaders of the faith the gospel that he was presenting to the Jews and Gentiles. He wanted to know that the gospel he was preaching was that of Jesus Christ, as he was getting a lot of opposition from false believers. Paul made himself accountable to the Apostles.