“One of them, named Agabus, got up and predicted by the Spirit that a severe famine was about to come over the whole inhabited world. (This took place during the reign of Claudius.)”
Prophecy was inspired teaching and sometimes, as here, included revelation of future events. Even the latter served as a call to action. The Christians decided to send help, v. 29, and then did so, v. 30.
Barnabas was from Jerusalem. Perhaps through him it was revealed that the saints in Judeia would be especially affected. Prompt action was taken, before the famine hit, to benefit a specific set of people, and carried out according to a specific plan.