One way or another people sometimes make this claim while trying to deny the historicity of Jesus and the resurrection.
It was just a legend. Jesus died and then legends about him arose later, and that was where we get the gospels and Paul’s letters.
The problem with this is that we have eyewitnesses reports (that go back to the original apostles) who saw Jesus risen from the dead. On top of these, the apostle Paul claimed to have seen the risen Jesus, and this led to his conversion. In fact, in 1 Corinthians 15, he says that the risen Jesus appeared to Peter, James and others. People who knew the apostles affirmed that Paul was teaching the right things.
A legend can’t be what happened because it is the original apostles who made the first proclamations that Jesus rose from the dead, and we have multiple records of this, along with the letters of the New Testament. You can say they hallucinated or were lying, but the story that Jesus came back from the dead comes from first generation witnesses of the event.
What do we do with that?
When we look at something like the existence of Caesar Augustus and his accomplishments, Rome’s greatest emperor, we depend on chiefly six sources to tell us about him. The first is a funerary inscription that is less than 4000 words. The other five are dated 90-200 years later.
When we come to Jesus, our chief sources are the four canonical gospels, Matthew, Mark, Luke and John and then another person who knew the Jerusalem apostles. The gospels are written within 20-65 years of Jesus’ death. Paul is writing as an eyewitness of the resurrection as well.
That makes the resurrection a well documented event in history. We have enough evidence to regard the resurrection hypothesis as something that happened in history.
You might not like it, but LEGEND is the wrong term.