Paul is addressing the Christian Thessalonian Church - those who are already faithful.
God, for His part, is faithful to bring to pass our (the Believer/Christian) sanctification. As we view the Scriptures, we understand that God’s faithfulness in bringing about our sanctification is accomplished by His Spirit who indwells the believer.
Yet, the Spirit's work of sanctification in the believer is dependent on the believer remaining faithful demonstrated by living and walking by the Spirit God gave us.
Galatians 5:24-25 (WEB)
24 Those who belong to Christ have crucified the flesh with its passions and lusts.
25 If we live by the Spirit, let us also walk by the Spirit.
God is faithful to bring our sanctification and salvation to pass, and to preserve us without blame, but only as we (Christians) remain faithful to God demonstrated in a commitment to live out that sanctified life that God commands of us. We do this as we remain in the faith, committed to walk by the Spirit of God who indwells us.
Romans 8:3-4 (WEB)
3 For what the law couldn’t do, in that it was weak through the flesh, God did, sending his own Son in the likeness of sinful flesh and for sin, he condemned sin in the flesh; 4 that the ordinance of the law might be fulfilled in us, who walk not after the flesh, but after the Spirit.
Not every Christian will remain faithful to walk by the Spirit. Many will grieve and quench the Spirit. Others will insult the Spirit by continual sinning and so be condemned. Hebrews 10:26-32
Not everyone who was given the Spirit by faith will remain faithful to live a sanctified life, otherwise, why would Paul warn the Thessalonians, in the very same letter to them, about their responsibility to walk in that sanctified life by the Spirit he gave them?
1 Thessalonians 4:3-8 (WEB)
3 For this is the will of God: your sanctification, that you abstain from sexual immorality, 4 that each one of you know how to control his own body in sanctification and honor, 5 not in the passion of lust, even as the Gentiles who do not know God, 6 that no one should take advantage of and wrong a brother or sister in this matter; because the Lord is an avenger in all these things, as also we forewarned you and testified. 7 For God called us not for uncleanness, but in sanctification. 8 Therefore he who rejects this doesn’t reject man, but God, who has also given his Holy Spirit.
We (who have His Spirit, verse 8) can reject God when we sin. Sin is a rejection of God’s authority over us, and this grieves God’s Spirit who indwells us. We are sanctified by God as we live sanctified lives before Him by His Spirit living in us.
1 Thessalonians 3:5 (WEB) For this cause I also, when I could not stand it any longer, sent that I might know your faith, for fear that by any means the tempter had tempted you, and our labor would have been in vain.
As we see from the above Scriptures that Paul wrote in the very same letter to the Thessalonians, he never expressed that the faith and sanctification of those he was writing to was guaranteed to the end. In addition, Paul never taught that faith was guaranteed to any of the churches he wrote to.
Paul did not even guarantee his own faithfulness to the end until near his impending martyrdom.
Philippians 3:12-14 (WEB)
12 Not that I have already obtained, or am already made perfect; but I press on, that I may take hold of that for which also I was taken hold of by Christ Jesus.
13 Brothers, I do not regard myself as yet having taken hold, but one thing I do: forgetting the things which are behind, and stretching forward to the things which are before, 14 I press on toward the goal for the prize of the high calling of God in Christ Jesus.
1 Corinthians 9:23-27 (WEB)
23 Now I do this for the sake of the Good News, that I may be a joint partaker of it. 24 Do not you know that those who run in a race all run, but one receives the prize? Run like that, that you may win. 25 Every man who strives in the games exercises self-control in all things. Now they do it to receive a corruptible crown, but we an incorruptible. 26 I therefore run like that, not aimlessly. I fight like that, not beating the air, 27 but I beat my body and bring it into submission, lest by any means, after I have preached to others, I myself should be rejected.
Near the time of the Apostle Paul’s martyrdom, only then could Paul say with confidence that he had stayed the course, endured, and fought the good fight of faith.
2 Timothy 4:6-9 (WEB) 6 For I am already being offered, and the time of my departure has come. 7 I have fought the good fight. I have finished the course. I have kept the faith. 8 From now on, the crown of righteousness is stored up for me, which the Lord, the righteous judge, will give to me on that day; and not to me only, but also to all those who have loved his appearing.
Paul did not even guarantee the faith of Timothy, whom Paul personally taught.
1 Timothy 4:16 (WEB)
16 Pay attention to yourself and to your teaching. Continue in these things, for in doing this you will save both yourself and those who hear you.
So, to rightly understand “1 Thessalonians 5:23-24” we consider the context of the whole Letter to the Thessalonians, and the context of Scripture itself, just as we have done. When we do this, then we understand that, for God’s part, He is faithful to bring about all good things for us. However, that promise is for those who stand by faith, living and walking by His Spirit who lives in the Christian as he continues to believe represented in following Lord Jesus, living and walking by His Spirit in us.