Praise be to Allah, and may blessings and peace be upon the Messenger of Allah. To proceed:
The scholars differed regarding the number of times the Trumpet will be blown, and the stronger opinion is that there will be two blasts, as indicated by the words of Allah تعالى:
﴿And the Trumpet will be blown, and whoever is in the heavens and whoever is on the earth will fall unconscious, except whom Allah wills. Then it will be blown again, and behold, they will be standing, looking on.﴾ [Az-Zumar: 68]
The first blast is the blast of the falling unconsciousness and death, while the second is the blast of resurrection and rising. Some scholars said that there are three blasts, but the opinion that there are two blasts is the stronger one.
It is authentically reported from the Prophet ﷺ that he said:
“The people will fall unconscious on the Day of Judgment, and I will be the first to regain consciousness, and there I will find Musa...” Narrated by al-Bukhari and Muslim.
It is also authentically reported that he ﷺ said:
“Then it will be blown again, and I will be the first to be resurrected, or among the first to be resurrected.” Narrated by al-Bukhari and Muslim.
In another hadith, he ﷺ said:
“I am the master of the children of Adam, the first whose grave will split open, and the first intercessor and the first whose intercession will be accepted.” Narrated by Abu Dawud; authenticated by al-Albani.
It is also authentically reported that he ﷺ said:
“I will be the first whose head is raised after the final blast.” Narrated by al-Bukhari.
These texts indicate that the Prophet ﷺ will be the first of the children of Adam to be resurrected and the first whose grave will split open after the second blast.
As for how this can be the case while Israfil عليه السلام is the one who blows the Trumpet, the scholars have mentioned two possibilities:
First: Israfil عليه السلام will be resurrected before the Prophet ﷺ so that he can blow the Trumpet, and then the Prophet ﷺ will be the first to be resurrected after this blast. Ibn Kathir mentioned this possibility, relying on reports including the Hadith of the Trumpet. However, this hadith is weak, so it cannot be relied upon to establish details concerning matters of the unseen.
Second: Israfil عليه السلام will be among those whom Allah تعالى exempts from the blast and death. He will therefore remain alive until he blows the second blast. Then the people will be resurrected, and the Prophet ﷺ will be the first of the people of the earth to be resurrected.
Therefore, there is no contradiction between Israfil عليه السلام being the one who blows the Trumpet and the Prophet ﷺ being the first of the children of Adam to be resurrected, because the manner in which Israfil عليه السلام remains alive or is resurrected before the Prophet ﷺ is among the matters of the unseen for which there is no authentic text establishing its details with certainty.
And Allah تعالى knows best.