Contrary to pretribulation thought, the rapture is never called a “mystery” when believers are caught up to the sky to meet Jesus at his Parousia. The rapture was first prophesied during the old covenant dispensation (John 14:1–4).
What Paul calls a mystery, instead, is the last generation of church saints will not have to die, because they will receive their new bodies when Christ returns: “Listen, I will tell you a mystery: We will not all sleep [die], but we will all be changed—in a moment, in the blinking of an eye, at the last trumpet. For the trumpet will sound, and the dead will be raised imperishable, and we will be changed” (1 Cor 15:51–52).
Paul locates this event at the beginning of Jesus’s Parousia (1 Cor 15:23, cf. 1 Thess 4:15). Jesus places the Parousia after (not before) the great tribulation (Matt 24:27, cf. 24:28–31).
To be sure, the resurrection is not the mystery itself, which was prophesied in the Old Testament concerning dead saints (Dan 12:2, Isa 26:19). Instead, Paul relates the mystery to the future event where a generation of living saints will not die before they receive their glorious bodies.