Acts 1:21-26 CSB
“Therefore, from among the men who have accompanied us during the whole time the Lord Jesus went in and out among us — beginning from the baptism of John until the day he was taken up from us — from among these, it is necessary that one become a witness with us of his resurrection.”
So they proposed two: Joseph, called Barsabbas, who was also known as Justus, and Matthias. Then they prayed, “You, Lord, know everyone’s hearts; show which of these two you have chosen to take the place in this apostolic ministry that Judas left to go where he belongs.” Then they cast lots for them, and the lot fell to Matthias and he was added to the eleven apostles.
CSB: Christian Standard Bible