Luke 2:35

we learn that “sword,” in the Arabic text and the Greek can mean lance as well as sword. Hence, when Our Savior was already dead on the Cross, the centurion came and pierced His side with a lance. Who felt the pain of this lance thrust into the Heart of the Son of God but His holy mother Mary? Her soul, which was continually being pierced on Calvary by the mocking blasphemies of the Jews and the pagan executioners, was now, after Jesus had expired, pierced unto death. Only by the Will of God did she not expire then and there. “The sons of men, whose teeth are spears and arrows, and their tongue a sharp sword” (Psalm 56:5).What is this sword?A Lapide tells us that Saint Eucherius of Lyons (Hom. in Dominicam), understands the sword of the Spirit to be the word of God, i.e., the spirit of prophecy, To Mary, he says, was revealed the secrets of Holy Scripture and the hidden thoughts of men. Even the hidden thoughts of her divine Son as we see at the wedding of Cana when the Mother with authority told the waiters: “Whatsoever He telleth you, do it.”https://catholicism.org/the-sword-revealeth-the-heart.html
https://biblehub.com/commentaries/luke/2-35.htm