Perhaps Elizabeth’s baby had leaped up because he himself — John the Baptizer — had just been filled with the Holy Spirit, from his mother’s womb, three months before he was born. Alternatively, he did so as a previously Spirit-filled fetus who then once again
recognized His Saviour within His Own human mother as she approached John within his own mother Elizabeth. Luke 1:15,41.
Either way, John was prenatally filled with the Spirit — at least once — long before he was born and thereafter circumcised. So his Circumcision (like the Baptism which later replaced it), did not initiate the indwelling of the Holy Spirit within John — but it sealed and strengthened that prior indwelling. Genesis 17:1-27; Romans 4:11; Colossians 2:11-13.