Jesus did not call Mary Magdalene mother.
The verse in John 19:25-27 says this:
"But standing by the cross of Jesus were His mother, and His mother’s sister, Mary the wife of Clopas, and Mary Magdalene. When Jesus then saw His mother, and the disciple whom He loved standing nearby, He said to His mother, 'Woman, behold, your son!' Then He said to the disciple, 'Behold, your mother!' From that hour the disciple took her into his own household." (John 19:25-27)
Mary was a very common name in Israel. So Mary the mother of Jesus, Jesus' mother's sister (His aunt), Mary the wife of Clopas, and Mary Magdalene were all at the foot of the cross.
There were 3 Marys there with John, who was the disciple who wrote the gospel of John.
So Jesus said to John (the disciple whom He loved) to take His mother (also called Mary) as his own.
Jesus did this because John lived the longest out of all the disciples. John also wrote the book of Revelation. By that time, most of the original disciples had died. Jesus' own siblings probably all died by then as well.
Jesus had half brothers and sisters:
"When the Sabbath came, He began to teach in the synagogue; and the many listeners were astonished, saying, 'Where did this man get these things, and what is this wisdom given to Him, and such miracles as these performed by His hands? Is not this the carpenter, the son of Mary, and brother of James and Joses and Judas and Simon? Are not His sisters here with us?' And they took offense at Him." (Mark 6:2-3)
So Jesus had 4 brothers and an unknown number of sisters. These were biological half siblings (born from Mary and Joseph). Jesus Himself was born of Mary (without biological human father). But Jesus is the Son of God the Father. He was born of Mary by the power of the Holy Spirit. Joseph was Jesus' father by name/adoption.