The Holy Spirit used to work in the Old Testament as well.
In the story of Samson we read that “the Spirit of the LORD began to move upon him at Mahaneh Dan” (Judges 13:25). And we also read that after Saul was anointed as king that “the Spirit of God came upon him, and he prophesied” (1 S 10:10). This also happened when David was anointed by Prophet Samuel to be king “the Spirit of the LORD came upon David from that day forward” (1 Sam 16:13). And the way the Holy Spirit came upon both Saul and David was through the Anointing Oil that the Lord ordered them to prepare in Exodus Book (Ex 30:22-31). And Aaron was anointed as a high priest when Moses poured from this holy anointing oil on Aaron’s head and anointed him (Lv 8:12), as we say in the psalm “It is like the precious oil upon the head, Running down on the beard, The beard of Aaron, Running down on the edge of his garments.” (Ps 133:2). And with this anointing oil the tent of meeting along with the altars and the utensils were anointed and became holy (Ex 40, Lv 8). With this anointing oil also kings and prophets were anointed (1 Kings 19). And as a result to the anointing, the Holy Spirit comes upon them and so comes His gifts as well.