"Not everyone that says to me, Lord, Lord, shall enter into the Kingdom of heaven, but he that does the will of my Father which is in heaven" Matthew 7:21.
The will of the Father is that you believe upon his Son Jesus Christ.
"Many will say to me on that day (Judgment Day) Lord, Lord, have we not prophesied in your name? and in your name cast out devils? and in your name done many wonderful works?" Matthew 7:22.
It was all about them and their works. This is the crux of religion. It is all about me, myself and I. The Gospel is about Jesus Christ.
"And then I will profess unto them, I NEVER KNEW YOU: depart from me you that work iniquity" Matthew 7:23.
He never knew them because they were counting on their works to save them. They didn't need Christ and his Gospel. They belonged to the church of "My way". The way of man, which is religion.
The last thing that one wants to do in the judgment is to bring up what you do, or what you have done, or what you have become. The reason for this is because we are all sinners without any saving merit of our own. If anyone goes to heaven it will be on the merits of Jesus Christ.
Here is an example.
Lord, Lord, didn't I join the Catholic church?
Lord, Lord, am I not a Calvinist?
Lord, Lord, did I not speak in tongues?
Lord, Lord, I, I, I, ???
The correct response in the judgment should be... Lord, Lord, did you not send Jesus into the world to atone for my sins?
Lord, Lord, didn't Jesus fulfill your Holy Law for me and justify me?
Lord, Lord, didn't you accept Jesus into heaven in my name and on my behalf?