the surrounding verse helps clarify what is being said
18 “Truly I say to YOU men, Whatever things YOU may bind on earth will be things bound in heaven, and whatever things YOU may loose on earth will be things loosed in heaven. 19 Again I truly say to YOU, If two of YOU on earth agree concerning anything of importance that they should request, it will take place for them due to my Father in heaven. 20 For where there are two or three gathered together in my name, there I am in their midst.”
Jesus is saying that if two of his apostles have come to a unanimous decision, its because that decision has already been made in heaven.
WT states:
the things that are ‘bound’ or ‘loosed’ on earth are things that have already been ‘bound’ or ‘loosed’ in heaven. The Greek words here used literally mean “having been bound” or “having been loosed,” which are in the perfect tense, passive voice. In other words, the tense suggests that the action had already been decided upon in heaven and is merely reflected in what is subsequently decided upon on earth by those who wish to reflect “wisdom from above.” (Jas. 3:17, 18) “Bound” would refer to being found guilty for punishment; “loosed” would refer to being found innocent.
These words of Jesus follow his discussion of the procedure that should be followed if a servant of God has a major “fault” to take up with his brother. (Verses 15-17) This could lead to the charge being taken up by the “congregation” in that the matter would come before the responsible brothers in the congregation for review and judgment. If the charge was proved true and sufficiently gross, with the individual showing no repentance, the result would be that this one would be considered as “a man of the nations and as a tax collector.” He would be disfellowshiped. All of this, of course, would require deliberations. And these deliberations are what Jesus had reference to in verses 18 to 20.
Since holy spirit would come to Jesus’ disciples through Jesus from and after Pentecost 33 C.E., it could be said that “where there are two or three gathered together in my [Jesus’] name, there I am in their midst.” All gathered to review the matter would need to be alert to the leadings of Jehovah’s spirit. Particularly would they need to weigh matters carefully in the light of his Word, including the instructions and teachings of Jesus, to see what Jehovah’s mind would be on the alleged conduct and what should be done if the evidence proves the charge as being true and the individual does not repent. Of course, those weighing matters impartially might find the accused innocent, or there may be insufficient evidence.
In the first century, Christians had miraculous operations of Jehovah’s holy spirit in some matters of judgment, such as in the judgment of Ananias and Sapphira. (Acts 5:1-11; 1 Cor. 12:4-11) After miraculous gifts of the spirit ceased with the death of the apostles, Christians have not expected direct miraculous indications from heaven as to how a matter should be decided. (1 Cor. 13:8-13) Nevertheless, we still have what Jehovah’s Word says about proper conduct and how matters should be decided. We can, in effect, determine what has already been decided on a matter in the heavens. Admittedly, due to human imperfections, mistakes in judgment are made at times, but this only emphasizes even more the need to adhere closely to the instructions in Jehovah’s Word in handling matters so as to be assured that what is decided is what has already been decided in heaven.
Its really referring to congregational decisions made by the apostles such as judicial matters and the like.