The Ignatius Catholic Study Bible New Testament has this to say on John 19:26 (I have removed the portion of the footnote that do not directly correspond to your question).
Jesus honors his Mother by entrusting her to the protective care of the Apostle John, presumably because Mary had no other children to assume the responsibility. John is not just an individual disciple, he is portrayed by the evangelist as an icon of every disciple whom Jesus loves. In this sense, Mary is given to all beloved disciples of Christ, just as every disciple is given to the maternal care of Mary. The assumption here is that family relations are extended beyond the limits of natural lineage, so that every baptized believer has God as a Father, Christ as an eldest brother, Mary as a Mother, and the saints as brothers and sisters (CCC 501, 964, 2679)
Below are the paragraphs of the Catechism as cited.
501 Jesus is Mary's only son, but her spiritual motherhood extends to all men whom indeed he came to save: "The Son whom she brought forth is he whom God placed as the first-born among many brethren, that is, the faithful in whose generation and formation she co-operates with a mother's love."160
160 LG 63; cf. ⇒ Jn 19:26-27; ⇒ Rom 8:29; ⇒ Rev 12:17.
**964 **Mary's role in the Church is inseparable from her union with Christ and flows directly from it. "This union of the mother with the Son in the work of salvation is made manifest from the time of Christ's virginal conception up to his death";502 it is made manifest above all at the hour of his Passion:
Thus the Blessed Virgin advanced in her pilgrimage of faith, and faithfully persevered in her union with her Son unto the cross. There she stood, in keeping with the divine plan, enduring with her only begotten Son the intensity of his suffering, joining herself with his sacrifice in her mother's heart, and lovingly consenting to the immolation of this victim, born of her: to be given, by the same Christ Jesus dying on the cross, as a mother to his disciple, with these words: "Woman, behold your son."503
502 LG 57.
503 LG 58; cf. ⇒ Jn 19:26-27.
**2679 **Mary is the perfect Orans (prayer), a figure of the Church. When we pray to her, we are adhering with her to the plan of the Father, who sends his Son to save all men. Like the beloved disciple we welcome Jesus' mother into our homes,39 for she has become the mother of all the living. We can pray with and to her. the prayer of the Church is sustained by the prayer of Mary and united with it in hope.40
39 Cf. ⇒ Jn 19:27.
40 Cf. LG 68-69.