No contradiction, there is a first Resurrection of the righteous dead who died for Christ those who cried out from under the altar
Revelation 6:
9 And when he had opened the fifth seal,
I saw under the altar the souls of them that were slain for the word of God, and for the testimony which they held:
10 And they cried with a loud voice, saying, How long, O Lord, holy and true, dost thou not judge and avenge our blood on them that dwell on the earth?
11
And white robes were given unto every one of them; and it was said unto them, that they should rest yet for a little season, until their fellowservants also and their brethren, that should be killed as they were, should be fulfilled.
1 Thess 4:16
16 For the Lord himself shall descend from heaven with a shout, with the voice of the archangel,
and with the trump of God:
and the dead in Christ shall rise first:
1 Cor 15:
23
But every man in his own order: Christ the firstfruits; afterward they that are Christ's at his coming.
Revelation 20:
4 And I saw thrones, and they sat upon them, and judgment was given unto them: and I saw the souls of them that were beheaded for the witness of Jesus, and for the word of God, and which had not worshipped the beast, neither his image, neither had received his mark upon their foreheads, or in their hands; and they lived and reigned with Christ a thousand years.
5 But the rest of the dead lived not again until the thousand years were finished. This is the first resurrection.
6 Blessed and holy is he that hath part in the first resurrection: on such the second death hath no power, but they shall be priests of God and of Christ, and shall reign with him a thousand years.
___________________________________________________
After the first resurrection the rest of the dead that remained in the grave and who died after the first resurrection, and the living that remain are raised in the second resurrection after the thousand years are finished
John 5:28-29
28 Marvel not at this: for the hour is coming,
in the which all that are in the graves shall hear his voice,
29
And shall come forth; they that have done good, unto the resurrection of life; and they that have done evil, unto the resurrection of damnation.
Revelation 20:
4 And I saw thrones, and they sat upon them, and judgment was given unto them: and I saw the souls of them that were beheaded for the witness of Jesus, and for the word of God, and which had not worshipped the beast, neither his image, neither had received his mark upon their foreheads, or in their hands; and they lived and reigned with Christ a thousand years.
5
But the rest of the dead lived not again until the thousand years were finished. This is the first resurrection.
6 Blessed and holy is he that hath part in the first resurrection: on such the second death hath no power, but they shall be priests of God and of Christ, and shall reign with him a thousand years.
7
And when the thousand years are expired, Satan shall be loosed out of his prison,
8
And shall go out to deceive the nations which are in the four quarters of the earth, Gog, and Magog, to gather them together to battle:
the number of whom is as the sand of the sea.
9
And they went up on the breadth of the earth, and compassed the camp of the saints about, and the beloved city: and fire came down from God out of heaven, and devoured them.
10 And the devil that deceived them was cast into the lake of fire and brimstone, where the beast and the false prophet are, and shall be tormented day and night for ever and ever.
11
And I saw a great white throne, and him that sat on it, from whose face the earth and the heaven fled away; and there was found no place for them.
12
And I saw the dead, small and great, stand before God; and the books were opened: and another book was opened, which is the book of life: and the dead were judged out of those things which were written in the books, according to their works.
13
And the sea gave up the dead which were in it; and death and hell delivered up the dead which were in them: and they were judged every man according to their works.
14 And death and hell were cast into the lake of fire. This is the second death.
15 And whosoever was not found written in the book of life was cast into the lake of fire.
Daniel 12:
1And at that time shall Michael stand up, the great prince which standeth for the children of thy people: and there shall be a time of trouble, such as never was since there was a nation
even to that same time:
and at that time thy people shall be delivered, every one that shall be found written in the book. 2And many of them that sleep in the dust of the earth shall awake, some to everlasting life, and some to shameand everlasting contempt.
There are two resurrections
1st resurrection. The righteous dead who were killed for Christ Before the thousand years
2nd resurrection. The rest of the dead that remained in the grave, those killed after the thousand years, and all the living at the time of Christ's return.