I'm sorry, but you're greatly mistaken and you would have recognized your error if you had simply kept on reading John's account. Here is a fuller version:
John chapter 20 verses 1 thru 18
The first day of the week cometh Mary Magdalene early, when it was yet dark, unto the sepulchre, and seeth the stone taken away from the sepulcher.
Then she runneth, and cometh to Simon Peter, and to the other disciple, whom Jesus loved, and saith unto them, They have taken away the Lord out of the sepulchre, and we know not where they have laid him.
Peter therefore went forth, and that other disciple, and came to the sepulchre.
So they ran both together: and the other disciple did outrun Peter, and came first to the sepulchre.
And he stooping down, and looking in, saw the linen clothes lying; yet went he not in.
Then cometh Simon Peter following him, and went into the sepulchre, and seeth the linen clothes lie,
And the napkin, that was about his head, not lying with the linen clothes, but wrapped together in a place by itself.
Then went in also that other disciple, which came first to the sepulchre, and he saw, and believed.
For as yet they knew not the scripture, that he must rise again from the dead.
Then the disciples went away again unto their own home.
But Mary stood without at the sepulchre weeping: and as she wept, she stooped down, and looked into the sepulchre,
And seeth two angels in white sitting, the one at the head, and the other at the feet, where the body of Jesus had lain.
And they say unto her, Woman, why weepest thou? She saith unto them, Because they have taken away my Lord, and I know not where they have laid him.
And when she had thus said, she turned herself back, and saw Jesus standing, and knew not that it was Jesus.
Jesus saith unto her, Woman, why weepest thou? whom seekest thou? She, supposing him to be the gardener, saith unto him, Sir, if thou have borne him hence, tell me where thou hast laid him, and I will take him away.
Jesus saith unto her, Mary. She turned herself, and saith unto him, Rabboni; which is to say, Master.
THIS IS WHERE JESUS APPEARS TO MARY - CONTRADICTORY TO MATTHEWS ACCOUNT BELOW⬇️⬇️⬇️.
Jesus saith unto her, Touch me not; for I am not yet ascended to my Father: but go to my brethren, and say unto them, I ascend unto my Father, and your Father; and to my God, and your God.
Mary Magdalene came and told the disciples that she had seen the Lord, and that he had spoken these things unto her.
Mary clearly appeared at the empty tomb TWICE.
At her first appearance, she thought that Jesus' body had been stolen and she ran and told Peter and John the same. When Peter and John came to the tomb, Mary came back with them. It was during her second appearance at the the empty tomb that the angel spoke unto her and therein lies your error. There is no discrepancy.