In Acts 4:1-31, it talks about Peter and John facing persecution, being arrested, and being released. After they are released they returned to their companions and told them about what had happened. They then prayed, and in Acts 4:31, it says they were filled with the Holy Spirit. Does this mean the apostles (depending on who "companion" refers to, it could just be Peter and John) received the Holy Spirit twice, in Acts 2 and in Acts 4?
"And they cast their lots, and the lot fell on Matthias. And he was numbered with the eleven apostles. When the Day of Pentecost had fully come, they were all with one accord in one place. And suddenly there came a sound from heaven, as of a rushing mighty wind, and it filled the whole house where they were sitting. Then there appeared to them divided tongues, as of fire, and one sat upon each of them. And they were all filled with the Holy Spirit and began to speak with other tongues, as the Spirit gave them utterance" (Acts 1:26-2:4).
One of the grammar rules of Greek is that a pronoun refers back to the nearest noun that has the same tense. Thus "they" in Acts 2:4, refers back to the apostles, mentioned in Acts 1:26. Thus, all twelve of the apostles were filled with the Holy Spirit.
"And being let go, they [Peter and John] went to their own companions [the other apostles] and reported all that the chief priests and elders had said to them. So when they [the other apostles] heard that, they raised their voice to God with one accord and said: "Lord, You are God, who made heaven and earth and the sea, and all that is in them, "who by the mouth of Your servant David have said: 'Why did the nations rage, And the people plot vain things? The kings of the earth took their stand, And the rulers were gathered together Against the LORD and against His Christ.' For truly against Your holy Servant Jesus, whom You anointed, both Herod and Pontius Pilate, with the Gentiles and the people of Israel, were gathered together to do whatever Your hand and Your purpose determined before to be done. Now, Lord, look on their threats, and grant to Your servants [all the apostles] that with all boldness they may speak Your word, by stretching out Your hand to heal, and that signs and wonders may be done through the name of Your holy Servant Jesus." And when they [all the apostles] had prayed, the place where they were assembled together was shaken; and they were all filled with the Holy Spirit, and they spoke the word of God with boldness" (Acts 4:23-31).
The earthquake and being filled with the Holy Spirit came in response to the apostle's prayer. They asked for boldness and they were given the confidence to know that God was with them. They were all filled with the Spirit and began speaking God's word with boldness. Yes, this is the second time it is mentioned as happening to the apostles. Notice in both cases being filled with the Spirit is immediately followed by teaching God's word. See: How can you know you are filled with the Spirit?