Where the story is told
Both accounts come one after the other in Surah al-Baqarah, Quran 2:259-260. They are signs that Allah can bring back to life what has died, which is the same power that will raise people on the Day of Resurrection.
The two stories are different, and it helps to keep them apart. In the first, a man is shown a sign without having asked for one. In the second, Ibrahim عليه السلام asks to see how Allah does it.