The gift of the indwelling Holy Spirit was a new promise God had never given to man prior to the New Covenant. The Spirit had been active in the Patriarchal and Mosaic dispensations, but He had never been promised to all the faithful. However, to all those of the Christian age who obey the commands of God, this great promise of the Holy Spirit is given (Acts 5:32)!
One of the first prophecies was given by Isaiah. God said “I will pour out my spirit upon thy seed” (Isa 44:3-5, cir 700 BC). Later Jesus said the Father gives the Spirit to his children who ask for it (Lk 11:13), but a man must do what is necessary to obtain this gift. Gal 3:2 indicates the Holy Spirit was not received “by the works of the old law” but by “the hearing of faith.” Paul contrasts the old Mosaic law system with the plan of salvation presented in the gospel of Christ (Rom 1:5; 16:26). Only adopted sons of God who have become members of God’s family will receive the Spirit in their hearts (Gal 4:6).
The Holy Spirit is active in the conversion of alien sinners (John 3:5; 16:8; Tit 3:4-7), and when the Holy Spirit came, the apostles were guided and preached “all truth” (Mark 16:15-16). By the authority of God, forgiveness of sins and receiving the Holy Spirit were promised to those who believed and obeyed in repentance and baptism (immersion). Read Acts 2:36-38.