The requirement for receiving the Holy Spirit is to believe and be baptized into the Body of Christ
Eph. 1:13 In whom you also, having heard the word of the truth, the gospel of your salvation, in Him also believing, you were sealed with the Holy Spirit of the promise,
Gal. 3:2 This only I wish to learn from you, Did you receive the Spirit out of the works of law or out of the hearing of faith?
1 Cor. 12:13 For also in one Spirit we were all baptized into one Body, whether Jews or Greeks, whether slaves or free, and were all given to drink one Spirit.
The first mention of the believers receiving the Spirit is actually not the day of Pentecost, but when Jesus resurrected
John 20:22 And when He had said this, He breathed into them and said to them, Receive the Holy Spirit.
He also alluded to this before His crucifixion and subsequent resurrection:
John 7:37-39 37 Now on the last day, the great day of the feast, Jesus stood and cried out, saying, If anyone thirsts, let him come to Me and drink. 38 He who believes into Me, as the Scripture said, out of his innermost being shall flow rivers of living water. 39 But this He said concerning the Spirit, whom those who believed into Him were about to receive; for the Spirit was not yet, because Jesus had not yet been glorified.
Thus the Spirit was actually made available to the believers upon Christ's resurrection. We can further see this in 2 Cor 15:45b: "the last Adam became a life-giving Spirit." When we believe in the Lord, the Spirit comes into us to regenerate us (that is the definition of salvation). It is only by the Spirit in us that we can be regenerated and called a son of God (Rom. 8:15, Gal. 4:6). Therefore, we know that to be saved is equivalent to having the Spirit within us.
Further, we know that we are saved when we believe in the Lord
Mark 16:16 He who believes and is baptized shall be saved, but he who does not believe shall be condemned.
Rom. 10:9 That if you confess with your mouth Jesus as Lord and believe in your heart that God has raised Him from the dead, you will be saved;
From this, we can prove that we receive the Holy Spirit when we believe into the Lord.
However, why does other parts of the scriptures mention of the outpouring of the Holy Spirit, as in Acts 2, Acts 10, Acts 8, etc? Actually, there are two aspects of the Holy Spirit, the essential aspect and the economical aspect. One can liken this to the matter of Jesus' baptism. We know that Jesus was born of the Holy Spirit (Matt 1:20, Luke 1:35) and is even God Himself, who is Spirit (John 4:24). Yet when He was baptized, it says that the Holy Spirit descended upon Him as a dove (Matt 3:16, Luke 3:22). This shows that essentially, Jesus is of the Holy Spirit, meaning that His being is of the Spirit, but He received the Holy Spirit economically at His baptism to start His ministry. The economical Spirit is for our Christian work, whereas the essential Spirit has more to do with our life and being.
The gift of the Holy Spirit economically is received when we are identified with the Body of Christ. In context of all the verses that mention of believers receiving the Spirit, there is the matter of the Body of Christ. For example, in the passage in Acts 8 as the OP mentioned, the believers in Samaria believed into the word and received the Spirit essentially, but they had not yet received the Spirit economically to identify them with the Body of Christ. The reason the Holy Spirit did not fall upon them outwardly and economically was so that the apostles, through whom the practical establishing of the church had been initiated in Jerusalem, might come to bring them into identification with the Body of Christ. This case is different from that of the ones in the house of Cornelius, who, when they believed in the Lord, received the Holy Spirit both essentially within them for regeneration and economically upon them for baptism into the Body of Christ (1 Cor. 12:13) and identification with the Body of Christ. That was because the gospel was preached then directly by Peter, who played the main role in the initiation of the practical establishing of the church.