ADDENDUM
" `Because of this, lo, I send to you prophets, and wise men, and scribes, and of them ye will kill and crucify, and of them ye will scourge in your synagogues, and will pursue from city to city;" (Matt. 23:34, YLT)
Matthias was a replacement for Judas who had died, keeping the number at 12.
"And about that time, Herod the king put forth his hands, to do evil to certain of those of the assembly, 2 and he killed James, the brother of John, with the sword," (Acts 12:1-2, YLT)
James was martyred before the Holy Spirit separated both Barnabas and Paul for the missionary journey in Acts 13: 2-3.
"2 and in their ministering to the Lord and fasting, the Holy Spirit said, `Separate ye to me both Barnabas and Saul to the work to which I have called them,'" (YLT)
So, the identity of the original twelve was subject to change because of the persecution. According to tradition James Alpheus was thrown down from the temple by the scribes and Pharisees and then stoned, but we do not know when that may have happened.
In Acts 14:4 & 14 Luke refered to Barnabas and Paul both as apostles as both were separated out of the church at Antioch by the Holy Spirit. However, Luke did not always refer to Barnabas as an apostle. At Acts 4: 36 -37, Luke describes the actions of Joses (Joseph), whom the apostles had surnamed Barnabas, ...
"Having land, sold it, and brought the money, and laid it at the apostles' feet." (KJV)
Luke clearly made a distinction between Barnabas and the apostles in the earlier scriptures. He made this distinction again in Acts 9:27 when Barnabas brought Saul / Paul to the apostles in Jerusalem recounting Paul's conversion on the way to Damascus. So, Barnabas was not an apostle before Acts 13, before James was martyred. Saul / Paul had already been appointed and selected by Christ as an apostle.
Up to Acts 13 Barnabas was reporting to the apostles in Jerusalem in a underling capacity, and acting as a mentor to Paul. Acts 13:1 describes Barnabas as a prophet and teacher in the church at Antioch.
Excerpt from Benson Commentary re. Acts 13:1 -
" ..The Holy Ghost said — Namely, by immediate revelation, but in what way communicated we are not informed. Separate me Barnabas and Saul for the work whereunto I have called them — Namely, the extraordinary work of preaching the gospel among the Gentiles — This was not ordaining them; Saul was ordained long before, and that not of men, neither by man, Galatians 1:1. At his conversion he was expressly called to preach to the Gentiles; and that call was renewed at the time Jesus appeared to him during his trance in the temple: but at what time Barnabas was called by the Holy Ghost to this work, is not said. And when they had fasted and prayed — A certain day being appointed for the purpose; and laid their hands on them — A rite which was used, not in ordination only, but in blessing, and on many other occasions. It was here intended to be a solemn token of their designation to their important office; they sent them away — Dismissed them from Antioch,..." Source: Biblehub
The Holy Spirit filled some gaps as the original apostles Christ appointed were persecuted and killed during the persecution to continue the work to spread the gospel.