After His Resurrection, Why Did Jesus Tell Mary Magdalene Not to Touch Him but Commanded Thomas to Touch Him?

Jesus told Mary not to cling to Him because He had not yet ascended, teaching her to embrace a new spiritual relationship, while Thomas’ touching confirmed faith.